Git - 如何在Linux和Windows之间维护可执行位

时间:2015-04-27 15:57:23

标签: linux windows git file-permissions

我一直在阅读许多指向git config core.fileMode false的主题但是我无法弄清楚这是否是我问题的实际解决方案。

core.filemode的定义有点模糊

core.fileMode
   If false, the executable bit differences between the index and the
   working copy are ignored; useful on broken filesystems like FAT.
   See git-update-index(1). True by default.

我想要解决的是这个问题。当我创建一个文件并使其在Ubuntu上可执行时,我可以将其推送到repo并保持x权限。当我将该文件提取到Windows并对其进行修改,提交和推送时,repo副本将失去执行权限。

core.filemode=False会解决我的问题吗?或者它只是用于告诉git,具有不同权限的相同文件之间没有区别?

每次在Windows上修改脚本时都需要git update-index --chmod=+x <file>吗?

0 个答案:

没有答案
相关问题