git push 报错!!!!

Posted 运维工匠实战(如果发现有错误请大家把正确的方法发送给我,方便

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git push 报错!!!!相关的知识,希望对你有一定的参考价值。

 

[[email protected] sh]# git push
To [email protected]:yanjing_chenl/IT-DOC.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to [email protected]: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上做了改修保,而不是在本地提交的所以有问题

[[email protected] 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(-)

再次提交问题解决:

[[email protected] 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 [email protected]:yanjing_chenl/IT-DOC.git
   75ffcb1..03424a3  master -> master

 

以上是关于git push 报错!!!!的主要内容,如果未能解决你的问题,请参考以下文章

git push上传代码到gitlab上,报错401或403

git报错:fatal: No configured push destination.

解决git push报错:failed to push some refs to ‘git@github.com:anightmonarch/JavaEasyGoing.git‘

解决git push报错:failed to push some refs to ‘git@github.com:anightmonarch/JavaEasyGoing.git‘

解决git push报错:failed to push some refs to ‘git@github.com:anightmonarch/JavaEasyGoing.git‘

git push 报错failed to push some refs to‘xxx‘