本文介绍了如何从Xcode项目中删除第二个远程git仓库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个大客户项目上工作时,我从我公司的其他项目(调试实用程序)中添加了一些源文件。这两个项目都连接到远程回购站。

In working on a large client project, I added a couple of source files from one of my company's other projects (Debugging utilities.) Both projects are connected to remote repos.

我必须将文件从项目窗口拖出而不是找到,或者在添加结果对话框中单击复制文件(如果需要)。

I must have either dragged the file from the project window instead of the finder, or failed to click "copy files (if needed) in the add resulting dialog.

无论如何,当我现在推或拉时,它会列出与项目连接的远程回购列表中的回购站。

In any case, when I now go t push or pull, it lists both repos in the list of remote repos connected to the project.

我不希望我的我希望项目中的所有文件都来自客户端的repo。

I don't want my client's project tied to my company's other repository. I want all the files in the project to come from the client's repo.

我尝试删除我添加的源文件,然后重新添加他们与复制文件复选框选中,但它仍然列出其他远程回购。

I tried removing the source files that I added and then re-adding them with the "copy files" checkbox checked, but it still lists the other remote repo.

如何摆脱第二个不需要的git回购该项目?

How do I get rid of the second, unwanted git repo from the project?

请注意,该项目实际上包含编辑在Xcode工作区中。我在工作区的.xcworkspace / xcshareddata / .xcscmblueprint文件中发现了一些不需要的回购。

Note that the project is actually contained in an Xcode workspace. I just found a mention of the unwanted repo in my workspace's .xcworkspace/xcshareddata/.xcscmblueprint file.

推荐答案

在终端中试用:

Try in the Terminal:

$ cd /my/project/folder
$ git remote

现在你知道遥控器的名字。

Now you know the names of the remotes.

$ git remote remove myUnwantedRemote

当然,如果你使用SourceTree,所有这些都很容易。

Of course all this is easy without Terminal if you use SourceTree.

这篇关于如何从Xcode项目中删除第二个远程git仓库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 03:28