balazs
5/16/2019 - 9:04 PM

Overriding one branch with another (without conflicts)

Quick solution to override the master branch with the dev branch's code - NO CONFLICTS. Original article about this can be found here: https://ben.lobaugh.net/blog/202412/replace-one-git-branch-with-the-contents-of-another (in the article is the other way arround - overriding dev branch with latest production branch)

git checkhout dev
git checkout -b new-master
git merge -s ours master
git checkout master
git merge new-master
git push