1

我在本地提交了几个文件。现在我想将 1 个文件回滚到以前的版本。

示例:已提交:A、B、C

想要:提交:A,C 回滚:B

谁能帮我?

谢谢。

4

1 回答 1

1

你想使用git checkoutor git show

git checkout B -- path/to/file

或者:

git show B:./path/to/file > ./path/to/file

然后像往常一样添加和提交。

于 2013-07-24T23:54:00.930 回答