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

后端 未结 11 1254
天命终不由人
天命终不由人 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 02:50

    Adding to Greg Hewgill answer (of using core.fileMode config variable):

    You can use --chmod=(-|+)x option of git update-index (low-level version of "git add") to change execute permissions in the index, from where it would be picked up if you use "git commit" (and not "git commit -a").

提交回复
热议问题