Answers for "how to discard all changes in git"

11

git discard all changes

git clean -df
git checkout -- .
Posted by: Guest on May-23-2020
1

git command line discard changes

git clean -dxn .  # dry-run to inspect the list of files-to-be-removed
git clean -dxf .  # REMOVE ignored/untracked files (in the current directory)
git checkout -- . # ERASE changes in tracked files (in the current directory)
Posted by: Guest on February-28-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language