Adam K Dean

How to replace master branch in git, entirely, from another branch?

Published on 6 October 2014 at 10:00 by Adam

If you want to completely replace a branch by merging over another, the follow trick will help you, as it has helped me:

git checkout yourbranch  
git merge -s ours master  
git checkout master  
git merge yourbranch  


This post was first published on 6 October 2014 at 10:00. It was filed under archive with tags git.