+9

Submodules: Reset multiple submodules at once

Dorn 7 years ago updated by Arno Baumfalk 1 year ago 6

if your submodules fail to check out - you have 2 reset each one by hand instead of resetting them all at once

+2

PLEASE FIX THIS! My project at work has 30+ submodules. This is extremely frustrating!!!

Just curious: how you would do that without SmartGit?

I use Tortoise Git for that operation.

It's frustrating because (1.) I really don't like Tortoise Git, and (2.) SmartGit is otherwise such well written software. It seems like a pretty basic feature to be able to reset all submodules to the appropriate commit when checking out a different commit in the main repo.

git submodule update --recursive
git submodule init --recursive

There seems a workaround (smartgit 22.1.2): select all submodules, stage, discard