【问题标题】:What files do I need to push when adding a swift playground to a public GitHub repo将 Swift Playground 添​​加到公共 GitHub 存储库时,我需要推送哪些文件
【发布时间】:2021-12-02 13:29:12
【问题描述】:

我正在向公共 GitHub 存储库添加一些 swift Playground,但我不确定要提交和推送哪些文件。

这是一个游乐场中的文件

File.playground/Contents.swift
File.playground/contents.xcplayground
File.playground/playground.xcworkspace/contents.xcworkspacedata
File.playground/playground.xcworkspace/xcuserdata/username.xcuserdatad/UserInterfaceState.xcuserstate
File.playground/xcuserdata/username.xcuserdatad/xcschemes/xcschememanagement.plist

注意:我将游乐场名称替换为 File,将我的用户名替换为 username

【问题讨论】:

    标签: swift github swift-playground


    【解决方案1】:

    如果您尚未将这些文件添加到索引中(如果您有但未提交,则可以执行 git reset 来取消暂存它们),您可以添加 .gitignore,其内容为一种形式github/gitignore Swift.gitignore

    然后执行git status:您可以添加、提交和推送仍然列出的文件。

    【讨论】:

      猜你喜欢
      • 2022-12-06
      • 2021-02-12
      • 2017-04-22
      • 2012-08-25
      • 1970-01-01
      • 1970-01-01
      • 2017-11-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多