github非快进错误 [英] github non fast-forward error

查看:128
本文介绍了github非快进错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这已被问了一堆,但我的问题似乎略有不同

I know this has been asked a bunch of times, but my problem seems slightly different

To https://github.com/sr/foo.git
08a86ab..3d1ece2  master -> master
! [rejected]        y_dev -> y_dev (non-fast-forward)
error: failed to push some refs to 'https://github.com/sr/foo.git'

好的,所以我需要从y_dev中进行一次拉取,我试过了:

ok, so I need to do a pull from y_dev, which I tried:

git pull origin y_dev
From https://github.com/sr/foo
* branch            y_dev  -> FETCH_HEAD
Already up-to-date.

这使我感到困惑。我认为拉应该为我解决这个问题,但有一些我不理解。解释/修正表示赞赏

This perplexes me. I thought a pull should fix this for me, but there is something I am not understanding. An explanation/fix appreciated

推荐答案

您正在将分支 y_dev 当前签出分行,这很可能是 master 。因此,您实际上并没有将本地 y_dev 更新为您的 git-pull

You are pulling branch y_dev into your current checked-out branch, which is most likely master. Thus you are not actually bringing the local y_dev up to date with your git-pull.

试试:

Try:

git checkout y_dev
git pull origin y_dev
git push origin y_dev

这篇关于github非快进错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆