blog.robotex.de

Overwrite a git branch with another

Assume you have a branch_new branch and want to overwrite branch_old with its content:

git checkout branch_new
git merge -s ours branch_old
git checkout branch_old
git merge branch_new

Back