git 报错 ! [rejected] master -> master (non-fast-forward)怎么解决

近期在使用git push本地资源至远端仓库时,执行add、 commit
、push之后,报错如下:
在这里插入图片描述

$ git pull --rebase origin master
From https://minus1.nie.netease.com/aryayang/yangxue-minus1
 * branch            master     -> FETCH_HEAD
fatal: It seems that there is already a rebase-merge directory, and
I wonder if you are in the middle of another rebase.  If that is the
case, please try
        git rebase (--continue | --abort | --skip)
If that is not the case, please
        rm -fr ".git/rebase-merge"
and run me again.  I am stopping in case you still have something
valuable there.
发现报错。


雪雪@LAPTOP-KGB5I2BA MINGW64 ~/Desktop/yangxue-minus1 (master|REBASE 1/1)
$ git rebase --continue
Successfully rebased and updated refs/heads/master.

雪雪@LAPTOP-KGB5I2BA MINGW64 ~/Desktop/yangxue-minus1 (master)
$ git pull --rebase origin master
From https://minus1.nie.netease.com/aryayang/yangxue-minus1
 * branch            master     -> FETCH_HEAD
Current branch master is up to date.

雪雪@LAPTOP-KGB5I2BA MINGW64 ~/Desktop/yangxue-minus1 (master)
$ git push origin master       成功解决。
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 8 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (7/7), 18.73 KiB | 6.24 MiB/s, done.
Total 7 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Validating your commit for gitlab code audit....
remote: Validated.
To https://minus1.nie.netease.com/aryayang/yangxue-minus1.git
   8588cba..3573fad  master -> master

雪雪@LAPTOP-KGB5I2BA MINGW64 ~/Desktop/yangxue-minus1 (master)

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值