简体   繁体   English

意外地使我的Netbeans Project文件夹成为github存储库

[英]Accidentally made my Netbeans Project folder a github repository

I've just finished a java course and a project in which we made a small java application. 我刚刚完成了一个java课程和一个我们制作了一个小型Java应用程序的项目。 In the project we used github, but since we're all pretty much beginners to java and github this was a rather confusing process. 在我们使用github的项目中,但由于我们几乎都是java和github的初学者,这是一个相当混乱的过程。

Therefore I might have made my NetBeansProjects folder, which is NetBeans' default folder for new projects, a repository to our project on github. 因此,我可能已经创建了NetBeansProjects文件夹,它是NetBeans的新项目的默认文件夹,是github上我们项目的存储库。

At least what happens is that every time I create a new project in NetBeans, it's automatically connected to our project on github. 至少会发生什么,每次我在NetBeans中创建一个新项目时,它都会自动连接到github上的项目。 I'd really like that my NetBeansProjects folder isn't connected to any remote github projects. 我真的很喜欢我的NetBeansProjects文件夹没有连接到任何远程github项目。

I have tried the git remote remove origin which resets the config by the looks of it but it doesn't solve the problem and any projects I create in NetBeans will still connect to our project on github. 我已经尝试了git remote remove origin ,它通过它的外观重置配置,但它没有解决问题,我在NetBeans中创建的任何项目仍将连接到我们在github上的项目。

Any suggestions to what might help? 对什么可能有帮助的任何建议?

If you don't need to keep track of anything in the Netbeans folder anymore, then you can just erase the .git folder which keeps all the git related data (you will lose everything that hasn't been pushed to github repo as well). 如果您不再需要跟踪Netbeans文件夹中的任何内容,那么您可以删除保留所有git相关数据的.git文件夹(您将丢失所有未被推送到github repo的内容) 。 The .git directory is hidden, procedure to make it visible (/display & erase it) depends on the OS you are using. .git目录是隐藏的,使其可见(/显示和擦除)的过程取决于您使用的操作系统。

If you want to keep using git, you can add the folders you don't want to have in github repo into .gitignore file. 如果你想继续使用git,你可以将github repo中你不想拥有的文件夹添加到.gitignore文件中。

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

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