git push提交 error: failed to push some refs to

异常信息:

error: failed to push some refs to 'https://git.*****.com/dp/service/springbootDemo.git'
hint: Updates were rejected because the remote contains work that you do

git push提交 error: failed to push some refs to_第1张图片

 问题分析:

git push提交 error: failed to push some refs to_第2张图片

命令处理的过程:

git pull –rebase origin master意为先取消commit记录,并且把它们临时 保存为补丁(patch)(这些补丁放到”.git/rebase”目录中),之后同步远程库到本地,最后合并补丁到本地库之中。
******@xu MINGW64 /e/workspace/springboot/demo (master)
$  git pull --rebase origin master
warning: no common commits
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/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 https://git.*******.com/dp/service/springbootDemo
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
First, rewinding head to replay your work on top of it...
Applying: ************

  git push提交 error: failed to push some refs to_第3张图片

最后再提交代码到远程服务。 

git push提交 error: failed to push some refs to_第4张图片

你可能感兴趣的:(git,github)