如何在git中重置特定文件?

这个问题在这里已经有了答案:

  • 使用Git将特定文件重置或恢复到特定修订版本? 28个答案

  • 如果您只想恢复到最新的提交,请尝试

    git checkout abc.txt xyz.txt
    

    如果您想要恢复的特定提交,请尝试

    git checkout <commit> abc.txt xyz.txt
    
    链接地址: http://www.djcxy.com/p/8977.html

    上一篇: How to hard reset specific files in git?

    下一篇: How can I restore an uncommited file between branches?