如何將 Playground 上傳到 GitHub

  1. 打開 Terminal App,切換到 playground 的資料夾。( playground 其實是個資料夾)

指令範例:

cd /Users/shih-yingpan/Desktop/MyPlayground.playground

2. 輸入 git init

3. 從 Xcode 重新打開 playground 檔案,現在你的 playground 已享有強大的 git 版本管理功能。

4. 從 Source Control > Commit 記錄你在 playground 所做的修改。

記得勾選藍色 playground 下的檔案。

5. 切換到 Source Control navigator,點選 New xxx Remote 上傳。

值得注意的,之後從 GitHub 下載時,它會變成一個資料夾。

請將資料夾名稱的結尾加上 .playground,即可從 Xcode 打開 playground。

--

--

彼得潘的 iOS App Neverland
彼得潘的 Swift iOS App 開發問題解答集

彼得潘的iOS App程式設計入門,文組生的iOS App程式設計入門講師,彼得潘的 Swift 程式設計入門,App程式設計入門作者,http://apppeterpan.strikingly.com