Home

Published

- 1 min read

git discard local changes

img of git discard local changes

The solution for this is noted below

git discard local changes

Solution

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

# Discard all local changes to all files permanently:
git reset --hard

Try other methods by searching on the site. That is if this doesn’t work