Question : git remove all local changes
Answered by : steamboatid
git reset; git checkout .; git reset --hard HEAD; git clean -fdx; \
git fetch --all; git pull
Source : https://stackoverflow.com/questions/14075581/git-undo-all-uncommitted-or-unsaved-changes | Last Update : Sun, 21 Nov 21
Question : remove local changes git
Answered by : brave-developer
git fetch # will fetch the latest changes on the remote
git reset --hard origin/master # will set your local branch to match the representation of the remote just pulled down.
Source : https://stackoverflow.com/questions/1146973/how-do-i-revert-all-local-changes-in-git-managed-project-to-previous-state | Last Update : Mon, 15 Feb 21