Question : git discard local changes
Answered by : friendly-fox
# Discarding local changes (permanently) to a file:
git checkout -- <file>
# Discard all local changes to all files permanently:
git reset --hard
Source : https://docs.gitlab.com/ee/topics/git/numerous_undo_possibilities_in_git/ | Last Update : Thu, 14 May 20
Question : how to remove file changes in git
Answered by : mushy-monkey-cvodx7g0ah6g
git clean -df
git checkout -- .
Source : https://stackoverflow.com/questions/52704/how-do-i-discard-unstaged-changes-in-git | Last Update : Sat, 30 May 20
Question : undo unstaged changes git
Answered by : modern-moth-48swajen7dg5
git checkout -- .
Source : https://stackoverflow.com/questions/52704/how-do-i-discard-unstaged-changes-in-git | Last Update : Fri, 08 May 20