git EGit的“自动共享位于git存储库中的项目”选项是什么意思?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30897185/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What does the option "Auto share projects located in git repository" of EGit mean?
提问by PCJ
Every time I import a maven project. Among the remaining tasks to be done always appears Auto share git project (waiting).
每次我导入一个maven项目。在剩余的待完成任务中总是出现Auto share git project (waiting)。
I dig in the web and I just find where enable/disable the option, but I want to understand what is doing and if I need it.
我在网上挖掘,我只是找到启用/禁用该选项的位置,但我想了解正在做什么以及我是否需要它。
What I always do is create/clone the project in command line and then import it in Eclipse, then I can do all the git work in EGit.
我总是在命令行中创建/克隆项目,然后将其导入 Eclipse,然后我可以在 EGit 中完成所有 git 工作。
Is the Auto share projects located in git repositoryoption necessary in this scenario or I can disable it?
在这种情况下是否需要位于 git 存储库选项中的自动共享项目,或者我可以禁用它?
采纳答案by Rüdiger Herrmann
In Short: Yes the option is necessary, otherwise you will have to manually share the project with the repository it belongs to.
简而言之:是的,该选项是必需的,否则您必须手动与其所属的存储库共享项目。
The option Auto share projects located in Git repositoryusually saves you the extra step of sharingthe created or imported project with a repository.
位于 Git 存储库中的自动共享项目选项通常可以为您节省与存储库共享创建或导入的项目的额外步骤。
A project that belongs to a certain repository (in Git: is located within the work directory) needs to be marked as such. Therefore you would open the projects context menu, go to Team > Share Projectand select the repository.
属于某个存储库(在 Git 中:位于工作目录中)的项目需要这样标记。因此,您将打开项目上下文菜单,转到Team > Share Project并选择存储库。
Only thereafter you will see decorations (e.g. current branch) and be able to commit changes of that project etc.
只有在此之后,您才会看到装饰(例如当前分支)并能够提交该项目的更改等。
Whenever a project is created or imported that is located within the work directory of a repository known to EGit, it will be automatically be shared if the above option is enabled.
每当创建或导入位于 EGit 已知存储库的工作目录中的项目时,如果启用上述选项,它将自动共享。