【问题标题】:Xcode Dual git reposXcode Dual git repos
【发布时间】:2018-06-14 10:56:01
【问题描述】:

我有一个 Xcode 项目,它当前连接到本地 git 源存储库,以便可以保存更改

如何添加第二个远程 gitHub 存储库。这样代码可以在本地和远程存储/保存?

或者如何将本地仓库更改为远程 GitHub 仓库

提前致谢

【问题讨论】:

    标签: xcode git github version-control


    【解决方案1】:

    要为本地 git repo 添加另一个远程,您可以使用以下任何选项:

    选项 1:在 Xcode 中添加远程

    • 在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 添加遥控器,方法是单击您的项目,然后选择“添加现有遥控器”选项。

    选项 2:在终端中添加遥控器

    在终端窗口->到本地git repo的目录->执行命令:

    git remote add <remote name> <remote repo URL>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-16
      • 2011-01-10
      • 2017-06-08
      • 2013-11-21
      • 2022-10-02
      • 2013-07-22
      • 2016-10-15
      相关资源
      最近更新 更多