简体   繁体   English

在Eclipse中放置Git存储库的位置?

[英]Where to put Git repository in Eclipse?

If I try to put repository inside project folder 如果我尝试将存储库放在项目文件夹中

在此输入图像描述

it warns it is not recommended to put git repository inside workspace. 它警告不建议将git存储库放在工作区内。

If I try to create intermediate folder 如果我尝试创建中间文件夹

在此输入图像描述

it swears "overlaps the location of another project" at the stage of creating new project. 它在创建新项目的阶段发誓“重叠另一个项目的位置”。

And if I try to create project inside workspace and repository outside, it moves the project also outside of workspace 如果我尝试在工作空间和存储库外部创建项目,它也会将项目移动到工作空间之外

在此输入图像描述

So, the only way to use Git under Eclipse it totally abandon workspace? 那么,在Eclipse下使用Git的唯一方法是完全放弃工作空间?

If you choose the last solution you present, to deal with git and Eclipse, you will not abandon workspace, all your code will remain into your Project Workspace but you will get an additionnal folder somewhere else containing your same code, versioned, a local git repository. 如果你选择你提出的最后一个解决方案,为了处理git和Eclipse,你不会放弃工作空间,你的所有代码都会留在你的Project Workspace中,但你会在其他地方得到一个包含相同代码,版本化,本地git的附加文件夹库。 By choosing this solution, you can only version some parts of your project and you also avoid some possible conflicts that can arise when versioning your workspace project folder. 通过选择此解决方案,您只能对项目的某些部分进行版本控制,并且还可以避免在对工作区项目文件夹进行版本控制时可能出现的一些冲突。 You can also have a cleaner view of your code if you want it without eclipse metadata and do some complex git tasks on the commandline in this separate folder. 如果你想要它没有eclipse元数据,你也可以有一个更清晰的代码视图,并在这个单独的文件夹中的命令行上执行一些复杂的git任务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM