如题,由于在github上做了修改,在本地提交时出现了小小的错误:
error: failed to push some refs to 'git@github.com:dearjohn/tutorial.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
错误中已经给出了初步的解决方案:
1.本地运行:git pull。目的是将本地之前一个版本的代码,与github上保持一致
2.运行gitpush,再将本地代码更新到github上
小问题,大牛绕道。