Xcode 中使用Github

來源:互聯網
上載者:User
Xcode 中使用Github

第一步:為你的mac添加認證,使得它能夠串連到github。

參考http://help.github.com/mac-set-up-git/  一步一步操作即可====================================================================第二步:建立項目先在github裡面添加一個Repository,通過http://github.com/首頁的new Repository串連進入,填寫相關的項目資訊,建立即可。建立後會跳轉到初始項目介面,先暫停,在第三步再使用這個介面。在mac上使用xcode建立一個項目,為項目使用git,建立過程中使用 create local git repository for this project,指定要儲存的目錄即可。====================================================================第三步:初始化提交項目回到第二步github建立項目後的介面。初始化有幾種方式,這裡我們選擇從已有倉庫提交代碼。執行下面的代碼即可。

Existing Git Repo?
   cd existing_git_repo    
   git remote add origin git@github.com:your_account/your_project.git   
   git push -u origin master
上面的代碼將本地的倉庫串連到遠程倉庫,並且將代碼提交到master分支上。
====================================================================
第四步:提交代碼
   建立的檔案,XCode會提示一個A標籤,表示是added的。
   編輯的檔案,XCode會提示一個M標籤,表示是Modified的。
   選中要更新的檔案,右鍵-->Source Control-->Commit Selected Files 通過此操作將變更提交到本地的倉庫中。
   選中要更新的檔案,File菜單-->Source Control-->Push 將本地變化儲存到遠程伺服器中。

from:http://qiufangzhou.blog.163.com/blog/static/506421802011924102515390/

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.