git 如何断开intellij中项目的git?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34446530/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:47:13  来源:igfitidea点击:

How to disconnect git for a project in intellij?

gitintellij-idea

提问by K F

I'm new in swift to intellij from eclipse. In eclipse, there's just a button disconnect in popup menu selection "team" which can disconnect the project from the version control system like git or svn, and even can delete version control information like files in ".git" dir or ".svn" dir of the project. I can't find the counterpart button of intellij and don't know how to delete the git information. I deleted the ".git" directory of the project, but opened intellij again, it still show that the project is in git and can't be pushed to new git repo.

我是从 Eclipse 快速到 Intellij 的新手。在eclipse中,弹出菜单选择“team”中只有一个按钮断开连接,可以将项目与git或svn等版本控制系统断开连接,甚至可以删除“.git”目录或“.svn”中的文件等版本控制信息项目的目录。我找不到intellij的对应按钮,不知道如何删除git信息。我删除了项目的“.git”目录,但是再次打开intellij,仍然显示项目在git中,无法推送到新的git repo。

采纳答案by Stefano Saitta

I guess that this could be a duplicate, you can find at least the first part of your question here

我想这可能是重复的,您至少可以在此处找到问题的第一部分

After that you remove VCS, you would be able to remove .git directory without any problem

之后,您删除 VCS,您就可以毫无问题地删除 .git 目录

回答by Yasir Shabbir Choudhary

Select the Project and make VCS "None"

选择项目并使 VCS“无”

Open the Setting and Click "Version Control then make selected project VCS as None.

打开设置并单击“版本控制,然后将选定的项目 VCS 设为无。