[英]sync submodule that is a fork with original repo
I have a 'super-repository' that has a submodule that is essentially a fork of an original repository (with my changes).我有一个“超级存储库”,它有一个子模块,它本质上是原始存储库的分支(带有我的更改)。 What would be a possible workflow I can use to merge with the latest changes on the master branch of the original repository into the submodule?
我可以使用什么工作流将原始存储库的主分支上的最新更改合并到子模块中? In other words, I want to update the submodule to the latest changes.
换句话说,我想将子模块更新为最新的更改。
I imagine I'd have to add a remote representing that original repository.我想我必须添加一个代表该原始存储库的遥控器。 So I went into the submodule's directory and added the remote, then tried
git pull origin master
, then in the super-repo I did git add the-submodule
, commit and push.所以我进入子模块的目录并添加远程,然后尝试
git pull origin master
,然后在超级仓库中我做了git add the-submodule
, commit 和 push 。 However, on another computer when I tried to do git pull && git submodule update
, I got the following error:但是,在另一台计算机上,当我尝试执行
git pull && git submodule update
,出现以下错误:
fatal: reference is not a tree: 1790434a80cca4173677c9a21ffd80a50cc970ef
致命:参考不是树:1790434a80cca4173677c9a21ffd80a50cc970ef
Unable to checkout '1790434a80cca4173677c9a21ffd80a50cc970ef' in submodule path 'oh-my-zsh'
无法在子模块路径“oh-my-zsh”中签出“1790434a80cca4173677c9a21ffd80a50cc970ef”
So I imagine I'm doing it wrong.所以我想我做错了。 I would appreciate any help.
我将不胜感激任何帮助。
我最终从头开始,它奏效了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.