Git 全局 core.fileMode false 在克隆上被本地覆盖
Git global core.fileMode false overridden locally on clone
阅读 this,我能够将我的 fileMode
配置全局和本地配置为 false。
但是,当我 git clone
、git 不断初始化项目时,本地配置强制为 fileMode true
,因此它会覆盖我的全局 false
。因此,对于每个项目,我必须删除本地配置或手动将其设置为 false
,这完全失去了拥有全局配置的意义。
如何防止 git 在每个项目上默认在本地设置此配置?这是由另一个配置变量驱动的吗?通过服务器?
Clone 与 init 一样,在创建新存储库时总是设置本地 core.filemode
。请参阅我对 this question for details. The only way to clobber the local setting after a clone is to do it manually (e.g., by having a wrapper command that does the clone, then goes into the clone and removes the setting). Or, as in and 的回答,将 -c core.filemode=false
添加到您的 git clone
(一定要将 -c
选项 放在 动词 clone
).
git clone --config core.filemode=false YOUR_REPOSITORY
更多信息请参考git克隆的使用信息,或者直接输入:
git clone
没有任何参数
阅读 this,我能够将我的 fileMode
配置全局和本地配置为 false。
但是,当我 git clone
、git 不断初始化项目时,本地配置强制为 fileMode true
,因此它会覆盖我的全局 false
。因此,对于每个项目,我必须删除本地配置或手动将其设置为 false
,这完全失去了拥有全局配置的意义。
如何防止 git 在每个项目上默认在本地设置此配置?这是由另一个配置变量驱动的吗?通过服务器?
Clone 与 init 一样,在创建新存储库时总是设置本地 core.filemode
。请参阅我对 this question for details. The only way to clobber the local setting after a clone is to do it manually (e.g., by having a wrapper command that does the clone, then goes into the clone and removes the setting). Or, as in -c core.filemode=false
添加到您的 git clone
(一定要将 -c
选项 放在 动词 clone
).
git clone --config core.filemode=false YOUR_REPOSITORY
更多信息请参考git克隆的使用信息,或者直接输入:
git clone
没有任何参数