From: Jeff King Date: Mon, 29 Oct 2012 08:12:12 +0000 (-0400) Subject: Merge branch 'jl/submodule-add-by-name' X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fdb4d27158e4f8e19ac3b11b896bff92038afbfa;p=git.git Merge branch 'jl/submodule-add-by-name' If you remove a submodule, in order to keep the repository so that "git checkout" to an older commit in the superproject history can resurrect the submodule, the real repository will stay in $GIT_DIR of the superproject. A later "git submodule add $path" to add a different submodule at the same path will fail. Diagnose this case a bit better, and if the user really wants to add an unrelated submodule at the same path, give the "--name" option to give it a place in $GIT_DIR of the superproject that does not conflict with the original submodule. * jl/submodule-add-by-name: submodule add: Fail when .git/modules/ already exists unless forced Teach "git submodule add" the --name option --- fdb4d27158e4f8e19ac3b11b896bff92038afbfa