gpt4 book ai didi

java - Java项目的git init在哪里?

转载 作者:太空狗 更新时间:2023-10-29 14:13:14 25 4
gpt4 key购买 nike

我创建了工作区 TestWorkspace 并在其中创建了项目 Testing Project(现在有 .settingssrc bin 文件夹和 .classpath.project 文件)。我将在这个项目下添加我的代码,我想在 gitHub 上托管这个项目。为此,我必须 git init

我应该在哪里git init?在工作区文件夹 TestWorkspace 或项目文件夹 Testing Project 中?什么是理想的方式,这样我就不会再遇到问题了?

最佳答案

来自 Egit 用户指南:

http://wiki.eclipse.org/EGit/User_Guide

It is probably not a good idea to make a project the root folder of your Repository

The reason is that you will never be able to add another project to this Repository, as the .project file will occupy the root folder; you could still add projects as sub-folders, but this kind of project nesting is known to cause lots of problems all over the place. In order to add another project, you would have to move the project to a sub-folder in the Repository and add the second project as another sub-folder before you could commit this change.

在工作区文件夹 TestWorkspace 中 git init 不是一个好主意。

将存储库放在 Eclipse 工作区之外是个好主意。

关于java - Java项目的git init在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26696303/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com