How do I make Git ignore file mode (chmod) changes?

后端 未结 11 1253
天命终不由人
天命终不由人 2020-11-22 02:29

I have a project in which I have to change the mode of files with chmod to 777 while developing, but which should not change in the main repo.

Git pick

11条回答
  •  心在旅途
    2020-11-22 03:05

    You can configure it globally:

    git config --global core.filemode false

    If the above doesn't work for you, the reason might be your local configuration overrides the global configuration.

    Remove your local configuration to make the global configuration take effect:

    git config --unset core.filemode

    Alternatively, you could change your local configuration to the right value:

    git config core.filemode false

提交回复
热议问题