Donn
Donn

Reputation: 53

`git mv` a submodule folder does not rename it

I have tried renaming the folder for a submodule in my repo with git mv, but it is not doing what I actually wanted (and I am avoiding doing something more complicated and messing up the repo, because I'm not well-versed with git).

What happens

Upon calling git mv old-path new-path, where old-path/ is the folder containing a submodule (a .git whose content is gitdir: ../.git/modules/<submodule-name>), I get back a submodule located at new-path/oldpath/, instead of simply new-path/.

The content of .gitmodules also change such that the path variable is path = new-path/old-path.

How to achieve the desired behavior of git mv of putting the submodule into new-path/?

Upvotes: 1

Views: 19

Answers (0)

Related Questions