仅作为记录。
背景
在进行git push时,出现:
$ git push -u origin master
To https://github.com/FHDD/PSeger-LabelMe.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/FHDD/PSeger-LabelMe.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first 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.
解决
在git push前,加入git pull(然后:q退出文档)
git pull
git push -u origin master
即可。
展示
参考
感谢大佬博主文章:传送门