错误提示:
To https://github.com/luodao236/test.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/luodao236/test.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
因为在创建GitHub仓库时,创建了一个叫 README.md 的文件,又是第一次提交代码。本地库不知道这个,因此更新被拒绝,
Updates were rejected because the remote contains work that you do not have locally.
解决方法为:首先需要合并远程的变化
git pull
#Fix any merge conflictes, if you have a 'README.md' locally
git push -u origin master