上傳工程到GitHub有兩種方式:
第一種:
1 首先在github上創建repository,復制對應的網址,下圖紅框所示
2新建工程,勾選options--Source Control -- Create Git repository on,將復制的地址粘貼到server address里面
3 添加好后在xcode菜單欄的Source Control里面選擇Push即可
第二種:
已經創建了工程,但是沒有選擇create Git,這時候需要用終端處理
1 cd /Users/silverk/Documents/項目/bltForSwift
2 git init
3 git add .(有點)
4 git commit -m "swift bluetooth"(“”里面是釋語,隨便寫)
5 完了重新打開工程,在xcode 菜單欄中,Source Control--Cheak out下分支中選擇Configure,添加對應的網址
6 選擇下方的push即可
參考網址:
http://www.cnblogs.com/mzds/p/3723817.html