git本地分支与服务器分支冲突的解决方法

! [rejected]master -> master (non-fast-forward)error: failed to push some refs to 'http://git.oschina.net/lightyear/nfc_beta2.git'hint: Updates were rejected because a pushed branch tip is behind its remotehint: counterpart. Check out this branch and merge the remote changeshint: (e.g. 'git pull') before pushing again.hint: See the 'Note about fast-forwards' in 'git push --help' for details.

【git本地分支与服务器分支冲突的解决方法】好久没有提交git,今天一提交发现和远程分支有了冲突,看了下描述。大致意思是:
由于你推送的分支落后于远程分支,更新失败。这说明你上次pull之后有人改动了源文件.
但是使用pull命令并没有生效,
于是参考了git fetch 拉取而不合并
git pull origin master

结果完成了提交.
git log

能够看到别人提交的记录以及自己的改动.

    推荐阅读