@2x.png
8.连接本地仓库和远程仓库
git remote add origin https://github.com/zhangjiahuan8888/XMLDownload.git
9、上传之前需要先拉取,执行以下命令:
git pull origin master
10.最后一步上传代码到远程仓库
git push -u origin master
执行后,如果没有异常,等待执行完成,上传成功。 中间可能会要求您输入,您只需输入帐号和密码即可。
笔记:
在执行 git push -u 步骤时,如果出现以下错误,错误原因是创建仓库时检查了 this with a。
中的.md文件不在本地代码目录中,
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:yangchao0718/cocos2d.git
hint: Updates were rejected because the tip of your current branch is behin
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.
可以通过以下命令合并代码【注:pull=fetch+merge】
执行上述代码后,可以看到本地代码库中多了.md文件
此时执行语句 git push -u 即可完成代码上传到
“““继续阅读”””
iOS系统
如何在iOS Xib中绘制虚线