【问题标题】:How to import Xcode Swift Playground into GitHub?如何将 Xcode Swift Playground 导入 GitHub?
【发布时间】:2017-02-16 17:19:07
【问题描述】:

我的本​​地设备上有一个 Xcode 8.2.1 Swift Playground。我可以将其导入新的 GitHub 存储库吗?

它目前不受源代码控制,我似乎无法从 Xcode 中创建 git repo。

我应该只使用终端并切换到 .playground 目录并执行 git init、提交、远程添加源和推送吗?如果我这样做,Xcode 会在源代码控制下识别它吗?

似乎没有在 Xcode 的源代码控制中添加新 Playground 的选项。

【问题讨论】:

    标签: github xcode8 swift-playground


    【解决方案1】:

    今天早上我遇到了同样的问题,发现这篇文章: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/

    这是使用您描述的方法将文件添加到 GitHub 的分步指南。我从 GitHub UI 创建了存储库,然后确保我的 Playground 位于一个文件夹中,并从终端中的该位置运行命令。截至目前,没有迹象表明 XCode 将 Playground 识别为处于源代码控制之下,但我的 Playground 确实成功推送到了我的 pre

    希望对您有所帮助。

    【讨论】:

    • 附加说明:使用 GitHub 桌面应用程序,我将上述引用的文件夹添加为存储库,并立即连接到正确的在线存储库。在那之后,XCode 实际上确实认识到它是源代码控制的。
    猜你喜欢
    • 2020-04-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多