move - Moving submodules with Git -


this question has answer here:

is there way move submodules within superproject without removing them first , re-adding them ?

it's similar how removing submodule (see how remove submodule?):

  • edit .gitmodules , change path of submodule appropriately, , put in index git add .gitmodules
  • if needed, create parent directory of new location of submodule: mkdir -p new/parent
  • move content old new directory: mv -vi old/parent/submodule new/parent/submodule
  • remove old directory git rm --cached old/parent/submodule

looks me afterwards:

# on branch master # changes committed: #   (use "git reset head <file>..." unstage) # #       modified:   .gitmodules #       renamed:    old/parent/submodule -> new/parent/submodule # 
  • finally commit changes.

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -