Skip to content

Instantly share code, notes, and snippets.

@rafbm
Created February 6, 2012 16:16
Show Gist options
  • Save rafbm/1753053 to your computer and use it in GitHub Desktop.
Save rafbm/1753053 to your computer and use it in GitHub Desktop.
Sane aliases for `git reset`
[alias]
unstage = reset HEAD # unstage
clear = reset --hard HEAD # erase uncommited file edits (destructive!)
uncommit = reset HEAD~1 # erase last commit but keeps related file edits
rollback = reset --hard HEAD~1 # erase last commit and related file edits (destructive!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment