git在子模块中添加远程 [英] git add remote in submodule

查看:158
本文介绍了git在子模块中添加远程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.gitmodule文件具有子模块url和路径的列表,类似于这个

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

以及在核心回购的.git / config中有远程列表

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

我得到子模块。

如何在子模块中添加一次远程列表?
每次不写

how add one time the list of remotes in a submodule ? for not write everytime

git remote add remoteAlias git://... 

在每个子模块中

in each submodule

推荐答案

我开始这个命令

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

用于将遥控器保存在.gitremotes文件中

for save the remotes in a .gitremotes file

这篇关于git在子模块中添加远程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆