Git diff says subproject is dirty

后端 未结 9 1813
情话喂你
情话喂你 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 18:11

    A submodule may be marked as dirty if filemode settings is enabled and you changed file permissions in submodule subtree.

    To disable filemode in a submodule, you can edit /.git/modules/path/to/your/submodule/config and add

    [core]
      filemode = false
    

    If you want to ignore all dirty states, you can either set ignore = dirty property in /.gitmodules file, but I think it's better to only disable filemode.

提交回复
热议问题