It may be useful to replace all the code on
master with another branch you've been working on. Depending on what you want to keep on master there are a couple of ways of doing this.
In these examples we will replace
master with the content on
You want to keep your previous progress on
master, just move all code from
develop across and wipe over the files on
git checkout develop git merge -s ours master git checkout master git merge develop
It's all gone wrong and you just want to wipe over master.
git checkout develop git push -f origin master