Is there some easy way to rename a git submodule directory (other than going through the entire motion of deleting it and re-adding it with a new destination name).
And while we are at it, why is it that I simply cannot do the following in the parent directory: git mv old-submodule-name new-submodule-name
I found following workflow working:
mv oldpath newpathgit rm oldpathgit add newpathgit submodule syncNote: this approach does not update the index and .gitmodules properly in 2018 versions of GIT.
Note: You may be able to just do git mv oldpath newpath now, as pointed out in VonC's answer. (Ensure you are using the latest version of git)