开发者

git add remote in submodule

开发者 https://www.devze.com 2023-03-17 18:12 出处:网络
the .gitmodule file have the list of submodule url and path, similar to this [submodule \".vim/bundle/subRepo\"]

the .gitmodule file have the list of submodule url and path, similar to this

[submodule ".vim/bundle/subRepo"]
    path = .vim/bundle/subRepo
    url = https://git.com/sub/repo

and in the .git/config of core repo have list of remotes

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git@otherRepo.com

when

 git submodule init
 git submodule update

I get the submodules.

how add one time the list of remotes in a submodule ? for not w开发者_StackOverflow中文版rite everytime

git remote add remoteAlias git://... 

in each submodule


git clone --recursive

or

git submodule update --init --recursive

if you already cloned.


I begin this command

https://github.com/juanpabloaj/git-remote-init

for save the remotes in a .gitremotes file

0

精彩评论

暂无评论...
验证码 换一张
取 消