1

I have a created a feature branch from master.

A week before, after completing my feature branch work say a message This branch has conflicts with the base branch in my pull request

To resolve these conflicting files, I did git pull origin master into my feature branch.
Now I am seeing all the commits from master is pulled into my branch and my pull request shows all my work additionally others work as well.

How do I solve this?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
vijay
  • 11
  • 2

1 Answers1

0

Instead of pulling (fetch + merge), you can instead:

  • reset again your feature branch to what it was before the pull
    (try git reset --hard ORIG_HEAD, or, if it is not working, git reflog + git reset --hard HEAD@{x}, with x being the number seen in reflog)
  • try a rebase instead:

    git checkout feature
    git fetch
    git rebase origin/master
    git push --force
    
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250