For all other commands there is the -4
flag that works (Configure git to use IPv4 instead of IPv6 by default), but for submodule update
, this option does not seem to exist... How to force ipv4 for git submodule update
?
Asked
Active
Viewed 340 times
1 Answers
1
You could use foreach
to create a custom git pull
:
foreach [--recursive]
Evaluates an arbitrary shell command in each checked out submodule.
git submodule foreach git pull -4

0stone0
- 34,288
- 4
- 39
- 64
-
For the first execution, it does not work – hl037_ Apr 03 '21 at 20:35
-
@hl037_ Yes, the problem here is that `git submodule foreach` only looks at the submodules that are initialized. You need a `git submodule init` first. – torek Apr 04 '21 at 19:41
-
even with a git submodule init, it doesn't work – hl037_ Apr 06 '21 at 04:53