git push origin master 异常 error: failed to push some refs to ‘https://gitee.com/...
程序员文章站
2022-07-11 08:29:09
...
异常详情:
$ git push origin master
To https://gitee.com/bismillah/zzsn_-kgplt_-frontend.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitee.com/***'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and 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.
解决过程:
说明:执行git push origin master 之前已执行git pull --rebase origin master命令
1、先删除git pull --rebase origin master产生的文件
$ rm -fr .git/rebase-merge/
2、删除之后需要重新切换到mater分支
$ git checkout master
3、然后重新执行提交命令
$ git add .
$ git status
$ git commit -m "commit info"
$ git pull --rebase origin master
$ git push origin master
Enumerating objects: 385, done.
Counting objects: 100% (385/385), done.
Delta compression using up to 16 threads
Compressing objects: 100% (331/331), done.
Writing objects: 100% (384/384), 1021.25 KiB | 11.88 MiB/s, done.
Total 384 (delta 27), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (27/27), done.
remote: Powered by GITEE.COM [GNK-6.2]
To https://gitee.com/****.git
0d058b6..0a6d718 master -> master
推荐阅读
-
git push异常整理 error: failed to push some refs to
-
git push origin master 异常 error: failed to push some refs to ‘https://gitee.com/...
-
Git push时报错 ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to......
-
push时git报错 error: failed to push some refs to 'git@gitee.com:git_zn/jianli.git' 解决办法
-
Git push时报错 ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to......
-
git使用报错 ! [rejected] master -> master (fetch first) error: failed to push some refs to '略‘
-
push时git报错 error: failed to push some refs to 'git@gitee.com:git_zn/jianli.git' 解决办法