I've this work flow with git. origin/master is 7 commits ahead of my branch "crazy-work" and crazy-work has 10 new commits. Now I want to merge crazy-work to origin/master. What is the best way to do this with minimal conflicts. even if there any conflict occurs choose the crazy-work branch's files as selected work. note that the branch crazy-work has the updated and stable source code.
Here is a little diagram
origin/master ------ a --- b --- c --- d --- e --- f ----?
\ crazy-work /
\___ h ___ i ___ j ___ k/
You can directly merge
crazy-work to master, or you can first rebase
crazy-work to master, resolving all the conflicts, and then merge it cleanly.
git checkout master git merge crazy-work
git checkout crazy-work git rebase master # possibly fixing conflicts, followed by # git rebase --continue git checkout master git merge crazy-work