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?
2 Answers
Git v2.7.0 adds support for the push.recurseSubmodules
configuration option. It can be set to the same values as the --recurse-submodules
command line options. For example:
git config push.recurseSubmodules check
means that subsequent invocations of git push
will automatically check that submodules have been pushed.
You could try aliasing it.
git config alias.ps "push --recurse-submodules=check"
Then use
git ps
-
6Yea, that's what I'm doing. But it would be better if we could default the real push to doing that.– noahOct 2, 2012 at 12:52
-