Skip to content

Instantly share code, notes, and snippets.

@adamhepton
Created October 26, 2015 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamhepton/434f3588551a2fdabc82 to your computer and use it in GitHub Desktop.
Save adamhepton/434f3588551a2fdabc82 to your computer and use it in GitHub Desktop.
Hard reset git branch to state of corresponding remote tracking branch
alias reset='git status -sb | awk -F'\''[/.]'\'' '\''NR==1{print "git reset --hard " $4 "/" $5}'\'' | xargs -I {} sh -c {}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment