2024 桐庐半程马拉松
00:00:00
时间
0.00
距离(公里)
--:--
配速
--
步频
--
心率 (bpm)
--
配速
步频
|
share-image
ESC

Note about fast-forwards 解决

git push 出现错误

 git push origin master
To github.com:monkey-wenjun/python2018.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:monkey-wenjun/python2018.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 fetch origin
warning: no common commits
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From github.com:monkey-wenjun/python2018
* [new branch] master -> origin/master


如果不行可以强制提交

git push -u origin master -f 
文章作者:阿文
文章链接: https://www.awen.me/post/24790.html
版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 阿文的博客
本文于 2018-04-13 发布,已超过半年(2848天),请注意甄别内容是否已过期。