开发者

git add remote in submodule

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜