0

I have two branches, develop and master. I push all my new work into develop and when done I need to merge it into master. I ran git merge --no-ff develop when in the master branch, but now I have a lot of merge conflicts. Is there a quick way to resolve these so I always use the develop version, instead of having to open each file and resolving them that way? Thanks

user1937021
  • 8,155
  • 20
  • 68
  • 129

1 Answers1

0

If you're in a merge you don't want to go forward with right now, the first thing to do would be to abort that merge with git merge --abort

Then if you want to merge your 'develop' branch into checked out branch 'master' while always taking changes from 'develop' where conflicts arise, the way to do that is with git merge -X theirs develop where master is checked out already.

See:

Is there a "theirs" version of "git merge -s ours"?

and: I ran into a merge conflict. How can I abort the merge?

for reference.

parshimers
  • 56
  • 4
  • thanks, but git merge --abort gave me an error is that right? says a file canntot merge and fatal: could not reset index file to revision "HEAD" – user1937021 Jun 16 '15 at 07:58
  • That's not what I would expect. Is your git version < 1.7.4? In that case `git reset --merge` will perform a roughly analogous operation. The checked out branch is still in a merge conflicted state, right? – parshimers Jun 16 '15 at 08:09