同步子模块是与原始存储库的分支
我有一个“超级存储库”,它有一个子模块,本质上是原始存储库的分支(带有我的更改)。我可以使用什么可能的工作流程将原始存储库主分支上的最新更改合并到子模块中?换句话说,我想将子模块更新为最新的更改。
我想我必须添加一个代表原始存储库的遥控器。所以我进入子模块的目录并添加了远程,然后尝试了 git pull origin master ,然后在超级仓库中我做了 git add the-submodule ,提交并推送。然而,在另一台计算机上,当我尝试执行 git pull && 时, git submodule update,出现以下错误:
致命:引用不是树:1790434a80cca4173677c9a21ffd80a50cc970ef
无法在子模块路径“oh-my-zsh”中签出“1790434a80cca4173677c9a21ffd80a50cc970ef”
所以我想我做错了。我将不胜感激任何帮助。
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. However, on another computer when I tried to do git pull && git submodule update
, I got the following error:
fatal: reference is not a tree: 1790434a80cca4173677c9a21ffd80a50cc970ef
Unable to checkout '1790434a80cca4173677c9a21ffd80a50cc970ef' in submodule path 'oh-my-zsh'
So I imagine I'm doing it wrong. I would appreciate any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最终从头开始,它成功了。
I ended up starting from scratch, it worked.