I have a branch called demo
which I need to merge with master
branch. I can get the desired result with following commands:
git pull or
When I tried using -X theirs
and other related command switches I kept getting a merge commit. I probably wasn't understanding it correctly. One easy to understand alternative is just to delete the branch then track it again.
git branch -D
git branch --track origin/
This isn't exactly a "merge", but this is what I was looking for when I came across this question. In my case I wanted to pull changes from a remote branch that were force pushed.