tl;dr
1# merge a branch on top of your existing master
2git checkout hotstuff
3git merge -s ours master
4git checkout master
5git merge hotstuff
NOTES:
-s ours
or --strategy=ours
will get rid of all changes in the other (obsolete) branch and overwrite with our branch (the branch you’er currently in).our
with a master
branch, it’ll overwrite everything in master and prefer changes in the other branch--no-commit
when merging to avoid the need of a commit messageYou can also try obliterating master
all together:
1git push -f origin hotstuff:master
This is useful when the other branch is not based off of master and the branch histories are completely irrelevant