Skip to content

Instantly share code, notes, and snippets.

@riosc
Created December 7, 2012 22:44
Show Gist options
  • Save riosc/4237138 to your computer and use it in GitHub Desktop.
Save riosc/4237138 to your computer and use it in GitHub Desktop.
undoing stageg changes and modified files in git
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment