脚本宝典收集整理的这篇文章主要介绍了php – Git子模块工作流建议,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我在终端中运行以下命令:
//1: clone the reposITory From Fuel's github. git clone git://github.COM/fuel/fuel.git //2: move into the main fuel directory cd fuel //3: initilize the submodules (populate .git/config with submodule data) git submodule init //4: download the submodules... git submodule update //5: move into the core directory (which is a submodule). cd fuel/core //6: change branch from (*no branch) to 1.1/develop git checkout 1.1/develop //7: oPEn random file in text editor + make some small change (i.e. typo) + save file. sudo gedit classes/autoloader.PHP //8: add this file to the staging area. git add classes/autoloader.PHP //9: commit this file under 1.1develop branch. git commit -m "im committing a submodule" //10: push the new commit to MY (not fuel's) github repo (yes i've renamed the repo). git push git@github.com:jordanarseno/fuel-core.git //11: changes are reflected on github,looks good. //12: back way out to fuel again. time to push the submodule commit separately. cd ../../ //13: add the fuel/core submodule to the staging area. git add fuel/core //14: commit the submodule change. git commit -m "submodule pushed. pushing super Now." //15: push the commit to MY (not fuel's) github repo. git push git@github.com:jordanarseno/fuel.git
具体来说,我的问题是:
>这是使用子模块的正确工作流程吗?这是你会做的吗?
>为什么git会拉下子模块中的1.1 / develop分支,但是默认情况下将我设置为* no branch?我可以修改此行为吗?
> Fuel子模块的哪一部分告诉git拉1.1 /开始开始?还有其他分支(1.1 / master,1.0 / develop等…).
>为什么我们不能在第11步称它为一天?子模块推动工作正常.我之后推动超级因为手册tells me it’s a good idea.事实上,前往GitHub并看着我的超级,我做了一个提交.然而,This commit 845de87似乎只是对Fuel的超级而非MY超级的参考.它不应该链接到MY repo而不是它们吗?
>在超级节目中运行cat .git / config:
连同所有子模块……
[remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = git://github.com/fuel/fuel.git`
在核心子模块中运行cat .git config@L_126_17@:
[remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = git://github.com/fuel/core.git
将这些网址更改为我自己在GitHub上的回购是否明智?无论如何,燃料拒绝推动.如果我执行子模块更新,它们会被覆盖吗?
我在Fuel’s Forums也问过这个问题,但这更像是一个普遍的问题,这里有更多的叮当声……谢谢!
以上是脚本宝典为你收集整理的php – Git子模块工作流建议全部内容,希望文章能够帮你解决php – Git子模块工作流建议所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。