Moving a git repository
I've found that submodules are not relative in git.
So, if you want to move a project that contains submodules, you have to edit the .git
file in the submodule, as well as the "worktree" attribute in the submodule config file, which is stored in the parent's .git/modules/MODULENAME/config
file.
Yes, everything in .git
is relative. If you have added the repository as a named remote to another repository, you would have to change the remote URL in that other repository, though.