1,上傳代碼到github上
1. git init
2. git add .
3. git commit -am "###" -------以上3步只是本地提交
4.git remote add origin [git@xx.xx.xx.xx:repos/xxx/xxx/xxx.git]
5.git push origin 本地分支:遠程分支(git push -u origin master)
###出現(xiàn)的問題1:(解決方案,輸入git pull --rebase origin master,出現(xiàn)錯誤的原因是git服務器中的README.md文件不在本地代碼目錄中,可以通過如下命令進行代碼合并,執(zhí)行這句代碼就可以使本地和git服務器同步了)
192:masonryDemoGitub macbook$ git push -u origin master
To https://github.com/chenwei007/CWMasonryDemo.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/chenwei007/CWMasonryDemo.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
2,Cornerstone提交Cocoapods文件簡單方法http://www.itdecent.cn/p/47b41cdf6bf8