码迷,mamicode.com
首页 > 其他好文 > 详细

git push 报错!!!!

时间:2017-01-03 20:47:38      阅读:212      评论:0      收藏:0      [点我收藏+]

标签:date   解决   fail   提交   git   jin   erro   ack   pull   

 

[root@NB sh]# git push
To git@x0.xx.xxx.x1:yanjing_chenl/IT-DOC.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to git@xx.x.x.x1:yanjing_chenl/IT-DOC.git
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again.  See the Note about
fast-forwards section of git push --help for details.

之前我直接在gitlab上做了改修保,而不是在本地提交的所以有问题

[root@NB sh]# git pull
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
From xx.xx.xx.x1:yanjing_chenl/IT-DOC
   3152d76..75ffcb1  master     -> origin/master
Auto-merging sh/GUOER.SH
Merge made by recursive.
 sh/GUOER.SH |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

再次提交问题解决:

[root@NB sh]# git push
Counting objects: 14, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 893 bytes, done.
Total 8 (delta 4), reused 0 (delta 0)
To git@xx.xx.xx.x1:yanjing_chenl/IT-DOC.git
   75ffcb1..03424a3  master -> master

 

git push 报错!!!!

标签:date   解决   fail   提交   git   jin   erro   ack   pull   

原文地址:http://www.cnblogs.com/bass6/p/6246000.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!