git submodule init and filemode

git submodule init

1. 只更新main repository的 .git/config,不会创建.git/modules

2.  一旦init之后,即使修改submodule的url,也不会更新到config中


git submodule update

1. clone submodules,创建main repository的.git/modules
2. submodules HEAD is detached
3. 默认的filemode=true (Cygwin中)


参考:

https://www.kernel.org/pub/software/scm/git/docs/git-submodule.html

https://www.kernel.org/pub/software/scm/git/docs/git-config.html


init

Initialize the submodules, i.e. register each submodule name and url found in .gitmodules into .git/config. It will also copy the value of submodule.$name.update into .git/config. The key used in .git/config is submodule.$name.url.This command does not alter existing information in .git/config. You can then customize the submodule clone URLs in .git/config for your local setup and proceed togit submodule update; you can also just use git submodule update --init without the explicit init step if you do not intend to customize any submodule locations.


core.fileMode

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

The default is true, except git-clone(1) or git-init(1) will probe and set core.fileMode false if appropriate when the repository is created.

core.ignoreCygwinFSTricks

This option is only used by Cygwin implementation of Git. If false, the Cygwin stat() and lstat() functions are used. This may be useful if your repository consists of a few separate directories joined in one hierarchy using Cygwin mount. If true, Git uses native Win32 API whenever it is possible and falls back to Cygwin functions only to handle symbol links. The native mode is more than twice faster than normal Cygwin l/stat() functions. True by default, unless core.filemode is true, in which case ignoreCygwinFSTricks is ignored as Cygwin’s POSIX emulation is required to support core.filemode.



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值