问题描述
在我的项目中,我有一个 plugins
文件夹,它是一个指向 ntc-templates
存储库的子树。
我为创建子树做了什么(来自这个 link)
git remote add ntc_templates https://github.com/networktocode/ntc-templates.git --no-tag
git fetch ntc_templates
git read-tree --prefix=plugins -u ntc_templates/master
git status
git commit -m "Add ntc-templates plugin"
后来我发现我必须在 ntc-templates 项目中添加一些功能。
我创建了一个分支来将这些更改提交到子树,但它失败了,显然是因为我不是 ntc-templates
git checkout -b blackport-ntc ntc_templates/master
git cherry-pick -x 0264b2671a3
git cherry-pick -x --strategy=subtree 25a01494ef6
git push ntc_templates HEAD:master
所以现在,我分叉了他们的 repo,碰巧,最后一次 ntc-templates/master
提交与我的分叉 repo 相同(他们在我的克隆和我的分叉之间没有新的提交)。
如何在不破坏我的仓库的情况下将我的子树从他们的仓库“迁移”到我的分叉仓库,因为 git 可能非常复杂......
非常感谢您的帮助
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)