[翻译] USING GIT IN XCODE [2] 在XCODE中使用GIT[2]

本文详细介绍了如何在Xcode中使用Git,包括如何克隆远程项目的步骤和注意事项,确保了项目的顺利管理和版本控制。

USING GIT IN XCODE

http://www.cimgf.com/2013/12/10/using-git-in-xcode/

USING AN EXISTING REMOTE PROJECT IN XCODE

To clone a copy of an existing remote repository, open the Organizer in Xcode and select Repositories.  Click the plus (“+”) button in the lower left hand corner of the Organizer, and select “Checkout or Clone Repository…”.

打开Xcode中的Organizer并选择Repositories,选择下图所示就可以拷贝远程的版本了。

Xcode will present a dialog requesting a URL or file path.  Xcode can handle both ssh and https URLs for git repositories.  Be sure to specify the full URL for the repository, which is typically available on the project page for Github or Bitbucket.

Xcode会弹出一个对话框,需要你提供一个URL地址或者是文件地址,Xcode可以处理ssh或者https方式的URL。确保填写的URL是正确的,这个URL地址在Github或者Bitbucket上有提供。

If the repository is private and requires authentication, Xcode will request your credentials for the repository.

如果这个版本是私有的而需要你验证,Xcode会要求你输入验证信息。

Provide your credentials and click OK.  Xcode will store your credentials in the keychain for subsequent accesses of the remote repository.  Note that Xcode can also handle ssh key authentication in addition to name and password.  Once Xcode has authenticated with the remote repository, Xcode will request a location to store the project, and then project will be cloned.  Once cloned the project can be opened or shown in the finder.

If you run into an issue with using the Checkout or Clone approach and authentication, Select “Add Repository…” instead.  You can then add your authentication information for the repository, and clone from there.  This approach worked for me in cases where using Checkout or Clone did not.

When the clone is complete, the local working copy is ready for updates.

填写了正确的信息后并点击OK,Xcode会存储证书信息到keychain中,便利于随后的版本控制操作。注意哦,Xcode是能够处理ssh方式验证信息的。一旦Xcode验证通过了远程的版本,Xcode会询问你一个本地地址用来存储工程,当你选择好地址后,点击确认,这个工程就可以保存到本地了。

如果你在用 Checkout 或者 Clone approach 时出现了问题,请选择 “Add Repository…”来代替。之后,你可以在那里把你的验证信息添加到版本中,后续使用都是一样的。

当工程项目拷贝结束了,这个本地的版本就可以进行更新操作了。

转载于:https://www.cnblogs.com/YouXianMing/p/4008972.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值