从 Xcode 项目中删除本地 git 存储库?

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

removing local git repositary from Xcode Project?

xcodegitxcode4.2git-svn

提问by nameless

I had selected local git repositary when I created xcode Project. But when import to SVN and commit, it commits locally not in SVN. How can I resolve this problem? I want to remove all hidden local git files from the Xcode project without affecting source code? any help please?

我在创建 xcode 项目时选择了本地 git 存储库。但是当导入到 SVN 并提交时,它在本地提交而不是在 SVN 中。我该如何解决这个问题?我想从 Xcode 项目中删除所有隐藏的本地 git 文件而不影响源代码?请问有什么帮助吗?

采纳答案by Michael Allen

You can find the solution in this question: How to fully delete a git repository created with init?

您可以在这个问题中找到解决方案: 如何完全删除使用 init 创建的 git 存储库?

You really should try google first before asking on SO.

在询问 SO 之前,您真的应该先尝试谷歌。

回答by NaXir

Open Terminal and Type

打开终端并输入

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

open the project in finder deletethe .git

在finder中打开项目 删除.git

Good to go. Enjoy

很高兴去。享受

回答by benzado

The local git repository is stored in a folder named .gitinside your project folder. It's hidden (any file/folder starting with a .is) but you can delete or move it using the Terminal. Once it's gone, your folder will no longer be recognized as having a git repository.

本地 git 存储库存储在.git项目文件夹内命名的文件夹中。它是隐藏的(任何以.is开头的文件/文件夹),但您可以使用终端删除或移动它。一旦它消失了,您的文件夹将不再被识别为具有 git 存储库。