如何在 xcode 9.0 中添加 git 存储库?

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

How to add a git repository in xcode 9.0?

xcodegit

提问by Sandesh Sardar

I'm trying to add a remote git repository in xcode project but I'm unable to find an option for that. getting option as

我正在尝试在 xcode 项目中添加一个远程 git 存储库,但我找不到相应的选项。获得选项作为

enter image description here

在此处输入图片说明

but expecting

但期待

enter image description here

在此处输入图片说明

Is there any other way to add remote repository to a project?

有没有其他方法可以将远程存储库添加到项目中?

回答by Hassan Shahbazi

Navigate to Source Controltab right next to the Project Navigator, then right clickon your project and select the Add Existing Remote.

导航到Source Control旁边的选项卡Project Navigator,然后right click在您的项目上并选择Add Existing Remote.

enter image description here

在此处输入图片说明

Then enter your remote URL.

然后输入您的远程 URL。

enter image description here

在此处输入图片说明

回答by Mehdi

You can use this command in terminal:

您可以在终端中使用此命令:

git remote add origin https://Your_git_URL.git

回答by Frank

Learning to do git from the console is very easy too use thisas a reference

学习从控制台做 git 也很容易,也可以参考一下