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.



你可能感兴趣的:(git)