How to discard all changes in Github desktop (mac), comparing to the latest commit?
It is possible to click on one file and select "discard changes". But how to discard all changes in files?
How to discard all changes in Github desktop (mac), comparing to the latest commit?
It is possible to click on one file and select "discard changes". But how to discard all changes in files?
Just in case anyone is interested, it can be done via GitHub's Menu Bar: Repository/Discard changes to selected files.
If anyone would be interested to do this without Github Desktop, since I got to this page by searching;
"How discard all changes work in Github Desktop?"
Just run the command below in your project folder from terminal:
git reset --hard
Use
git checkout .
to revert local changes and add a
git pull
to fetch the latest code from remote