如何在git中将文件还原到以前的状态?
时间:2020-03-05 18:45:13 来源:igfitidea点击:
鉴于以下交互:
$ 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>.