how to remove local changes in a file in git code example Example: remove changes file git command git checkout -- <file>