如何将文件恢复到git中的先前状态?

时间:2008-08-29 20:54:55

标签: git

鉴于以下互动:

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

如何在工作副本中恢复'foo'?我正在寻找类似的东西:

$ git <magic> foo
Restored foo to revision <blah>.

0 个答案:

没有答案