Fixing a diverged local master branch
Should your local master diverge from (Github) master branch, this is a way to resolve what ails you:
$ git rebase origin/master
That will do the expected rewind + patch your changes on top. But if things have diverged to the point where they cannot be reconciled, you might need to blow up your local changes. You can do it like so:
$ git reset --hard origin/master
And your branch is gone! Let's hope that Github tells the truth.
Written by Alfonso Roman
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#