Last active
December 20, 2015 18:59
-
-
Save andrewgho/6180433 to your computer and use it in GitHub Desktop.
git-total-reset - wipe out any changes, make repo match origin/master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# git-total-reset - wipe out any changes, make repo match origin/master | |
# Andrew Ho (andrew@zeuscat.com) | |
git checkout -f master | |
git stash clear | |
git fetch | |
git reset --hard origin/master | |
git clean -xfd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment