首页 > 其他 > 详细

git操作之常见问题解决方案

时间:2015-11-07 10:39:39      阅读:264      评论:0      收藏:0      [点我收藏+]

一、版本不一致

  1. 错误信息:    

1 > git push -u origin master
2 To ******.git
3  ! [rejected]        master -> master (non-fast-forward)
4 error: failed to push some refs to *******.git
5 hint: Updates were rejected because the tip of your current branch is behind
6 hint: its remote counterpart. Integrate the remote changes (e.g.
7 hint: git pull ...) before pushing again.
8 hint: See the Note about fast-forwards in git push --help for details.

  2. 错误原因: 本地和远程两个版本不一致。

  3. 解决方案: git push -u origin -f

  4. 注: 加‘-f‘的意思是-强制推送本地的替换服务端, 所以三思后行。

未完待续...

git操作之常见问题解决方案

原文:http://www.cnblogs.com/MonkeyKingK/p/4944589.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!