Skip to content

Instantly share code, notes, and snippets.

@delacruz-dev
Created March 9, 2017 13:24
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save delacruz-dev/e72accd6175271a7ea8317661e91db9d to your computer and use it in GitHub Desktop.
Save delacruz-dev/e72accd6175271a7ea8317661e91db9d to your computer and use it in GitHub Desktop.
Git Tip: Reset unstaged changes and files
# Revert changes to modified files.
git reset --hard
# Remove all untracked files and directories. (`-f` is `force`, `-d` is `remove directories`)
git clean -fd
@surendra1987
Copy link

surendra1987 commented May 14, 2018

git clean -df

This one worked for me. This removes all unstaged changes in one go.

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