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

hint: not have locally. This is usually caused by another repository pushing

时间:2019-06-01 11:20:32      阅读:301      评论:0      收藏:0      [点我收藏+]

标签:reject   ons   gic   err   git push   ant   count   log   erro   

 

git 提交代码前先pull代码,否则会报如下错误

 

 

wangju@wangju-HP-348-G4:~/test/reponselogiccheck$ git status
On branch master
Your branch is ahead of ‘origin/master‘ by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
wangju@wangju-HP-348-G4:~/test/reponselogiccheck$ git push
To git.5i5j.com:kaifa/reponselogiccheck.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to ‘git@git.5i5j.com:kaifa/reponselogiccheck.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.
wangju@wangju-HP-348-G4:~/test/reponselogiccheck$ git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git.5i5j.com:kaifa/reponselogiccheck
   2a5b889..e69bef2  master     -> origin/master
Auto-merging a.py
CONFLICT (content): Merge conflict in a.py
Automatic merge failed; fix conflicts and then commit the result.
wangju@wangju-HP-348-G4:~/test/reponselogiccheck$ ls
a.py  bb.py  testGitlab
技术图片

 

hint: not have locally. This is usually caused by another repository pushing

标签:reject   ons   gic   err   git push   ant   count   log   erro   

原文地址:https://www.cnblogs.com/kaerxifa/p/10958830.html

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