How to git revert the changes of one specific file, while my commits changes are involving other files as well?
本问题已经有最佳答案,请猛点这里访问。
案例场景
假设我有3个文件:
1 2 3 4 | Dir/ a.py b.py c.py |
我有10个提交,每一个都涉及对这三个文件的更改。
For example commit with hash code ABCD is changing 3 lines from a, 10 lines from b and 1 line from c. Same stands for the rest for the commits.
号
此时,我意识到在文件a.py中所做的所有更改都是无用的。
这将做:
它将复位这个特定的文件 specified承诺。 P / < >