Skip to content

Instantly share code, notes, and snippets.

@andrewgho
Last active December 20, 2015 18:59
Show Gist options
  • Save andrewgho/6180433 to your computer and use it in GitHub Desktop.
Save andrewgho/6180433 to your computer and use it in GitHub Desktop.
git-total-reset - wipe out any changes, make repo match origin/master
#!/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