git相关的知识

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 174,049评论 25 709
  • 在此特此声明:一下所有链接均来自互联网,在此记录下我的查阅学习历程,感谢各位原创作者的无私奉献 ! 技术一点一点积...
    远航的移动开发历程阅读 11,341评论 12 197
  • 3.2 对象已死? 对象是否存活的判断方法 可作为GC Roots的对象 虚拟机栈(栈帧中的本地变量表)中引用的对...
    donglq阅读 345评论 0 0
  • 近几天,因为些事情,心情很差。从不想吃饭,到夜不能眠,到坐卧不安。心里反反复复地想,一遍一遍地肯定否定。以至于工作...
    xingcheng阅读 337评论 0 0
  • 一个星期以前看到微信群转发“我是剽悍一只猫,我在服务号“一块听听”的讲座:《普通人迅速崛起的十个狠招》,将于...
    高乐呵阅读 81评论 0 0