What is the similar command in git to IntelliJ's "git revert"?

3

How can I reverse the state of a specific file through git commands? Similar to IntelliJ's git revert option where I select the files I want to revert. When I select all the options in the git revert terminal, I list all the branches.

daniela.morais@tusk:~/Development/git/oknok-clicktag$ git revert 
Display all 217 possibilities? (y or n)
    
asked by anonymous 09.04.2015 / 15:11

1 answer

3

To undo the changes of a specific file since the last commit (aka discard changes ), just do

git checkout -- path/to/file

To revert all files

git checkout -- .

See "Examples" section of Git checkout

    
09.04.2015 / 16:19