【发布时间】:2018-06-14 10:56:01
【问题描述】:
我有一个 Xcode 项目,它当前连接到本地 git 源存储库,以便可以保存更改
如何添加第二个远程 gitHub 存储库。这样代码可以在本地和远程存储/保存?
或者如何将本地仓库更改为远程 GitHub 仓库
提前致谢
【问题讨论】:
标签: xcode git github version-control
我有一个 Xcode 项目,它当前连接到本地 git 源存储库,以便可以保存更改
如何添加第二个远程 gitHub 存储库。这样代码可以在本地和远程存储/保存?
或者如何将本地仓库更改为远程 GitHub 仓库
提前致谢
【问题讨论】:
标签: xcode git github version-control
要为本地 git repo 添加另一个远程,您可以使用以下任何选项:
在Xcode -> Source Control Tab -> working copy name -> Configure the working copy -> Remote -> Add remote -> 输入你要添加的remote name和remote URL。
此外,您还可以参考帖子How to add a git repository in xcode 9.0 添加遥控器,方法是单击您的项目,然后选择“添加现有遥控器”选项。
在终端窗口->到本地git repo的目录->执行命令:
git remote add <remote name> <remote repo URL>
【讨论】: