Skip to content

Instantly share code, notes, and snippets.

@dariodiaz
Forked from JeffreyWay/tip.sh
Last active December 21, 2015 03:29
Show Gist options
  • Save dariodiaz/6243057 to your computer and use it in GitHub Desktop.
Save dariodiaz/6243057 to your computer and use it in GitHub Desktop.
git: undo everything since your last commit, including the addition of new files
alias gundo='git reset HEAD~ && git clean -df'
@dariodiaz
Copy link
Author

Another recomendation

Put this in .gitconfig

[alias]
    undo = reset HEAD~ && clean -df
usage: $ git undo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment