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?
Asked
Active
Viewed 2,831 times
15
noah
- 21,289
- 17
- 64
- 88
2 Answers
25
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.
Mike Crowe
- 642
- 6
- 18
-
See also the answers to [this question](http://stackoverflow.com/questions/5814319/git-submodule-push) – Mike Crowe Jan 05 '16 at 15:56
16
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. – noah Oct 02 '12 at 12:52
-