From: Junio C Hamano Date: Wed, 24 Oct 2018 07:18:24 GMT Subject: Re: Bug with "git mv" and submodules, and with "git submodule add something --force" Message-ID: In-Reply-To: <20181022215236.72238-1-sbeller@google.com> Stefan Beller writes: >> You would want to be able to remove a submodule and replace it with >> a directory, but you can probably do it in two steps, i.e. >> >> git reset --hard >> git rm --cached sha1collisiondetection >> echo Now a regular dir >sha1collisiondetection/READ.ME >> find sha1collisiondetection ! -type d -print0 | >> git update-index --add --stdin -z > > "Ignoring path sha1collisiondetection/.git" > > Nice! There actually is another possible outcome that anybody following along must be aware of and be careful about: not even .git directory exist there, i.e. it is possible that the submodule has never been init'ed. So, it is not that nice X-<.