SDG
SDG

Reputation: 2342

How to resolve a conflict locally without actually merging the pull request

I currently have a branch that is in a pull request back into the master branch. There is a conflict with a couple of git markers that I would like to delete. But I do not want to continue with the merging, since I am waiting for a review on my pull request. Is there a way to remove these conflict markers without actually initiating the merging process?

I am amenable to doing this either locally or on Bitbucket. It would be ideal if I learned how to do it on both these platforms.

Upvotes: 1

Views: 2535

Answers (2)

dbird
dbird

Reputation: 336

One option to fix the merge conflicts without merging your branch into the master branch is to merge the master branch into your branch. First checkout the master branch locally and pull master from Bitbucket to make sure you local copy of master is up to date. Then merge master into your branch and fix the merge conflicts. Finally, push your branch up to Bitbucket.

Upvotes: 3

Max Peng
Max Peng

Reputation: 3257

If you are in the middle of the merging process and do not want to continue, you can try: git merge --abort

Upvotes: 1

Related Questions