• 请不要在回答技术问题时复制粘贴 AI 生成的内容
forgottencoast
V2EX  ›  程序员

为什么git reset --hard无法重置工作区的若干个文件?

  •  
  •   forgottencoast · Nov 23, 2013 · 7514 views
    This topic created in 4579 days ago, the information mentioned may be changed or developed.
    git checkout也不行,总有3个文件没有被还原。
    这3哥文件已跟踪,git status -s显示第二列M。
    Supplement 1  ·  Nov 23, 2013
    问题解决,参见:http://stackoverflow.com/questions/11383094/unstaged-changes-left-after-git-reset-hard
    3 replies    2019-11-16 23:37:41 +08:00
    4code1
        1
    4code1  
       Nov 24, 2013
    试试 git clean -dxf
    msg7086
        2
    msg7086  
       Nov 24, 2013
    多数就是行尾cr/lf的问题。其实diff一下就知道问题在哪了
    chengcheng222e
        3
    chengcheng222e  
       Nov 16, 2019
    git config core.filemode false 这个搞定
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1478 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 16:31 · PVG 00:31 · LAX 09:31 · JFK 12:31
    ♥ Do have faith in what you're doing.