简体   繁体   English

如果从GIT下的项目中删除.git目录,会发生什么情况? 这是“调整”我的项目的好方法吗?

[英]What happens if I remove the .git directory from a project under GIT? Is it a good way to “ungit” my project?

maybe it could be a trivial question (I am not so into GIT). 也许这可能是一个琐碎的问题(我不太喜欢GIT)。

I have a Java project that is synchronized with my remote GIT repository. 我有一个与远程GIT存储库同步的Java项目。 So into my project I have the .git directory. 所以在我的项目中,我有.git目录。 My Java project still works fine? 我的Java项目仍然可以正常工作吗?

If I want momentarily "ungit" my project, can I remove the .git directory from my project? 如果我想暂时“取消”我的项目,是否可以从项目中删除.git目录? Then adding it again to my project it will again under GIT? 然后将其再次添加到我的项目中,是否会再次在GIT下?

Yes, this will ungit your project. 是的,这将取消您的项目。 But make sure that the current branch is the code you want 但是请确保当前分支是您想要的代码

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

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