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.
完成此任务的最佳实践是什么:
我有提交:
A -- B -- C
提交 B 包括:
file1.java file2.java icon.png
我想撤消对 的更改file1,file2但不想撤消对icon.png.
file1
file2
icon.png
您可以暂存提交 B 的还原,然后在提交之前重置映像文件。
# Prepare a revert of B git revert -n B # Recover the current version of the image git checkout HEAD -- icon.png # Commit the "almost" reversion of B git commit