Skip to content

Instantly share code, notes, and snippets.

@npero
Created November 30, 2012 15:43
Show Gist options
  • Select an option

  • Save npero/4176519 to your computer and use it in GitHub Desktop.

Select an option

Save npero/4176519 to your computer and use it in GitHub Desktop.
Git revert from all changes(untracked, unversionned, staged)
git reset --hard # removes staged and working directory changes
git clean -f -d # remove untracked files
git clean -f -x -d # CAUTION: as above but removes ignored files like config.
http://www.kernel.org/pub/software/scm/git/docs/git-clean.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment