Search code examples
gitgit-mergegit-merge-conflict

Git merge conflicts, don't want to remove anything


I have a merge conflict in a pull request:

@import "includes/_variables.scss";
@import "includes/_mixins.scss";
@import "includes/relatedProducts/_styles.scss";
<<<<<<< HEAD
=======
@import "includes/stickyHeader/_styles.scss";
>>>>>>> sticky-header
@import "includes/_responsive.scss";

and I don't want to remove either of those lines. I want to have them both on master.

What should I do? I want the changes to be seen in pull request and not remove anything, just add the new stuff to already existing files.


Solution

  • You only need to remove the conflict markers (<<<<<<<, =======, >>>>>>>):

    @import "includes/_variables.scss";
    @import "includes/_mixins.scss";
    @import "includes/relatedProducts/_styles.scss";
    @import "includes/stickyHeader/_styles.scss";
    @import "includes/_responsive.scss";
    

    See Resolving a merge conflict using the command line for more details.