Xcode 5 - 删除项目的源代码管理

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

Xcode 5 - remove source control for project

xcodegit

提问by Reza Safari

I've been using source control on a project for awhile, but now I don't want to use source control. How do you remove source control from a project in Xcode 5?

我一直在一个项目上使用源代码管理一段时间,但现在我不想使用源代码管理。如何从 Xcode 5 中的项目中删除源代码管理?

回答by Shamsudheen TK

There are three ways. Method 1 will disable source control for all projects. Method 2 will delete the link to a single repository for all projects. Method 3 will remove the link to a repository for a single project. I think Method 3 is the one you are looking for.

有三种方式。方法 1 将禁用所有项目的源代码管理。方法 2 将删除所有项目的单个存储库的链接。方法 3 将删除指向单个项目的存储库的链接。我认为方法 3 是您正在寻找的方法。

1: Through Source Control Management Preferences

1:通过源控制管理首选项

In Xcode, choose Xcode-> Preferences, then select Source Controland uncheck Enable Source Controloption.

在 Xcode 中,选择Xcode-> Preferences,然后选择Source Control并取消选中Enable Source Control选项。

enter image description here

enter image description here

2: Go to Xcode->Preference->Accounts->Repositoriesand delete them.

2: 进入Xcode->Preference->Accounts->Repositories并删除它们。

enter image description here

enter image description here

3: You can do it manuallythis way: Show Hidden Files on your Macand delete all the .svnor .gitor .tffiles (according to the source control) folders from the project.

3:您可以通过这种方式手动执行此操作在 Mac 上显示隐藏文件并从项目中删除所有.svn.git.tf文件(根据源代码管理)文件夹。

Example svn directory:

示例 svn 目录:

enter image description here

enter image description here

回答by Aaron Brager

The steps for Xcode 5 are the same as the steps for Xcode 4:

Xcode 5的步骤与 Xcode 4 的步骤相同:

Just remove the .gitdirectory in the project folder. You should close the project in Xcode first to be safe.

只需删除.git项目文件夹中的目录。为了安全起见,您应该先在 Xcode 中关闭项目。

回答by Abdurrahman Mubeen Ali

  1. Quit XCode.
  2. Open Terminal.
  3. Navigate to the root directory of the project.
  4. Type find ./ -name .svn -exec rm -rf {} \;.
  5. Open your project.
  1. 退出 XCode。
  2. 打开终端。
  3. 导航到项目的根目录。
  4. 键入find ./ -name .svn -exec rm -rf {} \;
  5. 打开您的项目。

Your project should be disconnected from all repositories.

您的项目应该与所有存储库断开连接。

NOTE:The command searches for all filenames with extension .svnand removes (recursively and forcefully)all of them.

注意:该命令搜索所有带有扩展名的文件名.svn并删除(递归和强制地)所有文件名。