From: Shibo Xia Date: Tue, 14 Apr 2026 01:28:20 GMT Subject: Re: How should submodules use different sshCommand during initial update? Message-ID: In-Reply-To: Hi, Yes, that would help as a workaround. If I understand correctly, the idea would be to run: git submodule init then adjust submodule..url entries in the superproject config before the actual clone happens, and only then run: git submodule update That does seem workable. My concern is that this still solves the problem indirectly through URL rewriting / SSH host aliasing, rather than allowing the submodule's SSH behavior itself to be configured more directly. So I think this answers the practical "how can this be done today?" part, but I am still wondering whether there is a reason Git should not support a more direct per-submodule sshCommand-style configuration. Thanks, Shibo Xia Junio C Hamano 于2026年4月14日周二 00:02写道: > > Shibo Xia writes: > > > My use case is that different submodules may need different SSH identities or > > different SSH command settings. > > Would it help to do "submodule init" separately from "submodule > update"? Then you have a chance to tweak the submodule.*.url > configuration items in the superproject repository before the clone > actually happens, I would imagine?