Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.