1

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.

SDG
  • 2,260
  • 8
  • 35
  • 77

2 Answers2

3

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.

dbird
  • 308
  • 3
  • 10
  • Isn't this just rebasing? This worked out for me! – SDG Jan 25 '21 at 03:19
  • @SharanDuggirala I'm glad the problem is fixed! But what you did was not rebasing. What you did was merging and merging is different than rebasing. However, you're right in that you could have solved the problem with rebasing. Take a look at https://www.atlassian.com/git/tutorials/merging-vs-rebasing if you want to know more about the difference between merging and rebasing. – dbird Jan 25 '21 at 03:40
1

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

Max Peng
  • 2,879
  • 1
  • 26
  • 43