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)
###出现的问题1:(解决方案,输入git pull --rebase origin master,出现错误的原因是git服务器中的README.md文件不在本地代码目录中,可以通过如下命令进行代码合并,执行这句代码就可以使本地和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.jianshu.com/p/47b41cdf6bf8