HASH="$(git rev-parse :path/to/submodule)" && git update-index --cacheinfo 160000,$HASH,path/to/submodule


it gets the commit hash that a submodule is set to in the index

then sets the submodule to that commit hash in the index

Sign in to participate in the conversation
Functional Café

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!