I always forget to push submodules. Sometimes I forget to add --recurse-submodules=check
to git push
. Even worse, others on my team might do the same. Is there a git config
option we can set to make check
the default?
问问题
2503 次
2 回答
22
Git v2.7.0 增加了对push.recurseSubmodules
配置选项的支持。它可以设置为与--recurse-submodules
命令行选项相同的值。例如:
git config push.recurseSubmodules check
意味着后续调用git push
将自动检查子模块是否已被推送。
于 2016-01-05T15:52:19.110 回答
16
你可以试试给它起别名。
git config alias.ps "push --recurse-submodules=check"
然后使用
git ps
于 2012-10-01T22:32:35.680 回答