83

Given the following interaction:

$ git add foo 
$ git commit -m "Initial import of 'foo'"
$ rm foo # This could be any destructive action on foo, like editing it.

How do I restore 'foo' in my working copy? I'm looking for something like:

$ git <magic> foo
Restored foo to revision <blah>.
Aaron Maenpaa
  • 113,855
  • 10
  • 93
  • 108

0 Answers0