Answers for "discard all the local changes git"

18

git discard local changes

# Discarding local changes (permanently) to a file:
git checkout -- <file>

# Discard all local changes to all files permanently:
git reset --hard
Posted by: Guest on May-07-2020
2

git revert all local changes

git reset; git checkout .; git reset --hard HEAD; git clean -fdx; \
git fetch --all; git pull
Posted by: Guest on November-14-2021

Code answers related to "discard all the local changes git"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language