Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在本地提交了几个文件。现在我想将 1 个文件回滚到以前的版本。
示例:已提交:A、B、C
想要:提交:A,C 回滚:B
谁能帮我?
谢谢。
你想使用git checkoutor git show:
git checkout
git show
git checkout B -- path/to/file
或者:
git show B:./path/to/file > ./path/to/file
然后像往常一样添加和提交。