从被拆分为子模块的远程设备中拉出和重新绑定 [英] Pull and rebase from a remote that's been split into submodules
问题描述
我正在合作一个GitHub项目(我已经分叉回购),最近被重新构建为子模块
。
之前我会 现在项目已经拆分成子模块,我该如何执行复制整个回购(包括所有子模块)应用我的(未合并)更改并继续我的开发? 请考虑将我已更改的文件已被更改为不同目录的可能性部分子模块重组。 您可以考虑选项 不要忘记你可以隐藏和重新绑定git pull。 其实,结合: 现在,一个简单的 注意:子模块默认位于分离HEAD模式,所以要确保他们已经先签出了一个分支,并且你已经在其中进行了一些本地提交,如果你想让rebase在这些子模块中实际执行某些操作。 I'm collaborating on a GitHub project (I've forked the repo) that has recently been re-structured into Earlier I would Now that the project has been split into submodules, how do I perform a pull rebase that replicates entire repo (including all submodules), re-apply my (unmerged) changes and continue with my development? Please do consider the possibility where the file(s) I had changed have been moved to a different directory as a part of submodule-restructuring. You could consider the option And don't forget you can stash and rebase by default on a git pull. Actually, combine that with the config: And now, a simple Note: submodules are by default in detached HEAD mode, so make sure they have checked out a branch first, and you have done some commits locally in them, if you want the rebase to actually do something in said submodules. 这篇关于从被拆分为子模块的远程设备中拉出和重新绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! git stash
我的更改,做一个 git pull --rebase shared_origin master
,然后执行 git stash pop
继续工作。在对我的本地仓库进行更改后,我会使用 git push my_origin development
将它们推送到共享仓库的分支,然后创建一个 PR < code $。
pull --recurse-submodule = yes
git config pull.rebase true
git config rebase.autoStash true
git config fetch.recurseSubmodules true
git pull
一个引用所有这些子模块)就足够了。
submodules
.git stash
my changes, do a git pull --rebase shared_origin master
, and then perform git stash pop
to continue working. After commiting changes to my local repo, I would push them to my fork of the shared repo using git push my_origin development
and then create a PR
.pull --recurse-submodule=yes
.git config pull.rebase true
git config rebase.autoStash true
git config fetch.recurseSubmodules true
git pull
from the parent repo (the one referencing all those submodules) is enough.