从 Xcode 4 中的项目中删除 git
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5526366/
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
Remove git from project in Xcode 4
提问by pajevic
I just created a new project in Xcode 4 and I guess I left the "Create local git repository for this project" box checked. Now, I would like to remove this version control since I want to run the project with svn only. Is this possible or do I have to create a new project from scratch?
我刚刚在 Xcode 4 中创建了一个新项目,我想我没有选中“为此项目创建本地 git 存储库”框。现在,我想删除此版本控制,因为我只想使用 svn 运行该项目。这是可能的还是我必须从头开始创建一个新项目?
采纳答案by Firoze Lafeer
Just remove the .git directory in the project folder. You should close the project in Xcode first to be safe.
只需删除项目文件夹中的 .git 目录。为了安全起见,您应该先在 Xcode 中关闭项目。
回答by JHyman
I had the same problem. Here are the steps to resolving this.
我有同样的问题。以下是解决此问题的步骤。
- Go to the Organizer (under window menu option)
- Go to Repositories
- Look at the bottom left corner for the minus button
- Select the project to be removed from GIT
- Press the minus icon
- It should be removed
- 转到管理器(在窗口菜单选项下)
- 转到存储库
- 查看左下角的减号按钮
- 选择要从 GIT 中删除的项目
- 按减号图标
- 应该删除
This works, even though the class files still have the symbol next to them. Clicking them then clicking another file gets rid of the icon.
这有效,即使类文件旁边仍然有符号。单击它们然后单击另一个文件即可消除该图标。
Hope this works.
希望这有效。
回答by arturgrigor
If you want to disable Git support in Xcode 4 you'll have to rename "/Developer/Library/Xcode/PrivatePlugIns/IDEGit.ideplugin" to something other than .ideplugin.
如果您想在 Xcode 4 中禁用 Git 支持,您必须将“/Developer/Library/Xcode/PrivatePlugIns/IDEGit.ideplugin”重命名为 .ideplugin 以外的名称。
回答by cesar
I had the same problem. I followed the steps from thisblog post and all worked fine for me. I was using Xcode 4.2 on OS X 10.7.3.
我有同样的问题。我按照这篇博文中的步骤操作,一切都对我来说很好。我在 OS X 10.7.3 上使用 Xcode 4.2。
I think the trick is making sure to delete the invisible ".git" folder in the project directory via the command line,... in addition to deleting the repositories via the Xcode GUI.
我认为诀窍是确保通过命令行删除项目目录中不可见的“.git”文件夹,...除了通过 Xcode GUI 删除存储库。
I'm now using SourceTree with Mercurial on BitBucket, and am a very happy camper! :-)
我现在在 BitBucket 上使用 SourceTree 和 Mercurial,我是一个非常快乐的露营者!:-)
回答by nithinreddy
You can easily do that using
您可以轻松地使用
rm -rf .git
rm -rf .gitignore
回答by NaXir
Open Terminal and Type
打开终端并输入
Terminal
终端
$ cd /RootOfProjectFile
$ rm -rf .git
$ rm -rf .gitignore
Manual Delete
手动删除
Open Terminal and type
打开终端并输入
$ defaults write com.apple.finder AppleShowAllFiles TRUE
$ killall Finder
simply open the project in finder deletethe .gitand .gitignorefrom root/(Where project file is present)
只需打开Finder中的项目删除的git的和的.gitignore从根/(如果项目文件存在)