Reputation: 576
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'
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
Upvotes: 1
Views: 569
Reputation: 6671
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
Upvotes: 2