Here are the steps remove uncommited changes to a file in Git:
- Firstly check the list of uncommited changes in your system by using the command “git status“
- To remove the changes to the file use the command:
git checkout <filepath>Make sure you use the full path as seen in the git status output
- Execute “git status” again to make sure that the file is now clean again.