drosofff
7/7/2016 - 11:03 AM

Force push a clean origin master into a divergent forked master

Force push a clean origin master into a divergent forked master

 git checkout origin/master # should be in a detached mode
git status # check the detached mode
git branch -D master # force delete the local master
git checkout -b master # recreate a master branch from the detached origin/master
git push drosofff master # should fail normally
git push -f drosofff master # force the push to resynchronize the fork