使用Git工具-PhpStorm的子模块 [英] Work with Git Tool - Submodules with PhpStorm

查看:119
本文介绍了使用Git工具-PhpStorm的子模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以向我解释..我对Git子模块和PhpStorm并不了解很多,我正在一个项目中工作,该项目有很多子模块,我确实添加了新的子模块并删除了其他子模块,其他的则被修改了.并且必须进行更新,并且所有内容都在一个主项目中,我也必须更新主项目,但我不知道如何检出项目中的一个子模块并进行提交(我也应该推送它)吗?主项目有变化吗?应该对此子模块进行另一次提交,并再进行一次提交?..我以前从未做过..而现在我必须做.

Can somebody explain me.. I don't know a lot of knowledge with Git Submodules and PhpStorm I am working with one project, that has a lot of submodules and I have do add new ones and delete others, others get modified and have to be updated and there are all in one main project, I have to update the main project as well I don't know how to checkout one submodule in the project and make a commit (should I push it too?) how that changes in the main project? another commit should be taken for this submodul and for that one more commit ? .. I have never done this before.. and I have to do it now.

请问如何用PhpStorm做到这一点,而不是使用git命令,这是非常明智的.

Please how can this with PhpStorm be done, not with git commands, it is very sensible.

推荐答案

据我所知,您有多个问题.首先,我想指出的是,您需要确保100%确定应该删除哪些子模块,而哪些模块应该保持不变.遗憾的是,我们无法建议应删除其中的哪些以及是否必须将其推入.

As I can see you have multiple questions. First of all, I would like to note that you need to make sure that you are 100% sure what submodules should be deleted and which should stay untouched. Regrettably, we cannot advise on which of them should be removed and whether they must be pushed or not.

如果您的远程存储库已经添加了一些子模块,而某些子模块已删除,则请单击VCS菜单下的更新项目" -它会更新项目中的根模块和子模块.有关更多信息,请参见此处: https://www.jetbrains.com/help/idea/sync-with-a-remote-repository.html#update

If you have a remote repository that already has some submodules added and some removed, then please click on "Update project" under VCS menu - it will update root and submodules in your project. For more please see here: https://www.jetbrains.com/help/idea/sync-with-a-remote-repository.html#update

如果只需要提交一个子模块,则请转至VCS |提交并在提交对话框中检查子模块文件夹.如果需要将其推送到远程存储库,则可以单击提交" 按钮旁边的箭头,然后选择提交并推送" .否则,如果要提交整个项目,请检查根文件夹.

If you need to commit only one submodule, then please go to VCS | Commit and in commit dialog check submodule folder. If you need to push it to remote repository, you can click on an arrow next to "Commit" button and pick "Commit and Push". Otherwise, if you want to commit the whole project - check the root folder.

这篇关于使用Git工具-PhpStorm的子模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆