How to revert changes in file in GIT?

You have edited one file in GIT version control system and you want to reset (revert) changes in this file. How can you do that?

Everything is simple: use checkout -- in command line. For instance:

git checkout -- path/to/file/my_changed_file.txt

Komentuoti