! [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 remote
hint: counterpart. Check out this branch and merge the remote changes
hint: (e.g. 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
好久沒有提交git豁鲤,今天一提交發(fā)現(xiàn)和遠(yuǎn)程分支有了沖突茎杂,看了下描述兜材。大致意思是:
由于你推送的分支落后于遠(yuǎn)程分支理澎,更新失敗。這說明你上次pull之后有人改動了源文件.
但是使用pull命令并沒有生效曙寡,
于是參考了git fetch 拉取而不合并
git pull origin master
結(jié)果完成了提交.
git log
能夠看到別人提交的記錄以及自己的改動.