git

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

adamkdean

Adam K Dean

Posted on October 6, 2014

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

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  
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
adamkdean
Adam K Dean

Posted on October 6, 2014

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related