简体   繁体   English

在Xcode中将源代码控制从Git交换到SVN

[英]Exchanging source control from Git to SVN in Xcode

My project previously was in the Git source control (cloudforge.com). 我的项目以前在Git源代码管理(cloudforge.com)中。 Now I want to exchange it to SVN source control. 现在,我想将其交换为SVN源代码管理。 (Why not, my team members are not familiar/feel-comfort in Git). (为什么不这样,我的团队成员对Git并不熟悉/不舒服)。 But when I want to checkout it already shows that it is yet in the Git source control. 但是,当我想检出它时,它已经表明它仍在Git源代码控件中。

在此处输入图片说明

I can't delete my project from git. 我无法从git中删除我的项目。 It shows this error 它显示此错误

在此处输入图片说明

But I have configured this project into svn by other Mac mini and able to checkout and commit. 但是我已经将该项目配置为由其他Mac mini导入svn并能够签出并提交。

My Question: 我的问题:

  1. Why I can't checkout this project from this Mac as I can do it from other Mac? 为什么不能像从其他Mac上那样从此Mac签出此项目?

OR 要么

  1. How can I delete my project from the first screenshot? 如何从第一个屏幕截图中删除项目? Because there I can't find any option to delete. 因为那里找不到删除的选项。

Are you wanting to import your complete git repository into a Subversion repository, including history and log information? 您是否要将完整的git存储库导入到Subversion存储库中,包括历史记录和日志信息? Or are you simply wanting to take a snapshot of your current project and make a Subversion repo out of it? 还是只是想为当前项目制作快照并从中制作一个Subversion版本库?

If you want to import the full history, then this may or may not be possible. 如果要导入完整的历史记录,则可能会或可能不会。 Git supports branching/merging schemes that Subversion can't handle. Git支持Subversion无法处理的分支/合并方案。 It's only possible for fairly simple, linear project histories. 只有相当简单的线性项目历史记录才有可能。 See this other question for more details and options. 有关更多详细信息和选项,请参见另一个问题

If you only want to move your current code snapshot into a different repository type, then the process should be relatively straightforward. 如果您只想将当前代码快照移动到其他存储库类型,则该过程应该相对简单。 All of git's metadata is stored in a normally-hidden folder in the root of your working copy named .git . git的所有元数据都存储在名为.git的工作副本根目录中的通常隐藏的文件夹中。 Most IDE's flag a project as being connected to a git repository based on whether this folder is present and whether it has the expected contents. 大多数IDE会根据此文件夹是否存在以及是否具有预期的内容,将项目标记为已连接到git存储库。 I'm not 100% certain about xcode, but here's what I typically do with other IDEs: 我对xcode不确定100%,但这是我通常对其他IDE所做的事情:

  1. Make a copy of the working copy directory 制作工作副本目录的副本
  2. Delete the hidden .git directory from the copy (plus any metadata files created by your IDE) 从副本中删除隐藏的.git目录(以及您的IDE创建的所有元数据文件)
  3. Import the copy into the IDE as a new project 将副本作为新项目导入到IDE中

At this point, your working copy will have no metadata and the IDE shouldn't associate it with any particular repository or version control system. 此时,您的工作副本将没有元数据,并且IDE不应将其与任何特定的存储库或版本控制系统相关联。 You should now be able to import it into a Subversion repository using the same process that you would for a new project. 现在,您应该可以使用与新项目相同的过程将其导入Subversion存储库。

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

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