2012-11-16

git - rename a submodule

git - rename a submodule

Rename a submodule:

$ mv submodule-oldpath ~/another-location
$ git rm submodule-oldpath
$ git submodule add submodule-repository-URL submodule-newpath

Result:

$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD ..." to unstage)
#
# renamed: submodule-oldpath -> submodule-newpath

Links

Bertrand Cachet - Rename Git submodule

No comments:

Post a Comment