Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the branch tip behind its remote?

Tags:

git

Despite pulling from the remote master and being told everything is up to date, I can't push to the remote master because the current branch is behind the tip of the remote. What?

$ git pull origin master
From https://github.com
 * branch            master     -> FETCH_HEAD
Already up-to-date.
$ git push origin master
To https://github.com
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.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.
like image 627
user3067865 Avatar asked May 22 '14 15:05

user3067865


1 Answers

You are probably on a different branch. git checkout master and try.

like image 173
manojlds Avatar answered Oct 06 '22 23:10

manojlds