Git command to revert uncommitted changes

While working on vs code workspace, we do many changes to test, but we don't need all of the files to commit. so we can revert or undo those changes, we can use following commands. 

Git revert specific uncommitted file

git checkout relative file path
git checkout myworkspace\classes\helloworld.cls

Git revert all uncommitted changes 

git checkout .

Flags:

  • Dot(.) -->  Consider all files 
Labels:
Git
Join the conversation