Git diff says subproject is dirty

后端 未结 9 1815
情话喂你
情话喂你 2020-11-28 17:47

I have just run a git diff, and I am getting the following output for all of my approx 10 submodules

diff --git a/.vim/bundle/bufexplorer b/.vim/bundle/bufe         


        
9条回答
  •  迷失自我
    2020-11-28 17:55

    git submodule foreach --recursive git checkout .
    

    This didn't do the trick for me but it gave me a list of files (in my case only one) that had been changed in the submodule (without me doing anything there).

    So I could head over to the submodule and git status showed me that my HEAD was detached -> git checkout master, git status to see the modified file once again, git checkout >filename<, git pull and everything fine again.

提交回复
热议问题