From: Junio C Hamano Date: Thu, 06 Oct 2016 20:11:20 GMT Subject: Re: [PATCH 1/2] submodule add: extend force flag to add existing repos Message-ID: In-Reply-To: <20161006193725.31553-2-sbeller@google.com> Stefan Beller writes: > Currently the force flag in `git submodule add` takes care of possibly > ignored files or when a name collision occurs. > > However there is another situation where submodule add comes in handy: > When you already have a gitlink recorded, but no configuration was > done (i.e. no .gitmodules file nor any entry in .git/config) and you > want to generate these config entries. For this situation allow > `git submodule add` to proceed if there is already a submodule at the > given path in the index. > > Signed-off-by: Stefan Beller > --- Yup, the goal makes perfect sense. I vaguely recall discussing this exact issue of "git submodule add" that refuses to add a path that already is a gitlink (via "git add" that has previously been run) elsewhere on this list some time ago.