如何將 Playground 上傳到 GitHub
Published in
Oct 19, 2016
- 打開 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。