Tag Archives: Git push Updates

Git push Updates were rejected because the tip of your current branch is behind

git push Error Updates were rejected because the tip of your current branch is behind

DannideMacBook-Pro:connect-cas2-client danni$ git push origin master
To https://gitee.com/danni3/connect-cas2-client.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitee.com/danni3/connect-cas2-client.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Solution: git pull origin master

DannideMacBook-Pro:connect-cas2-client danni$ git pull origin master
From https://gitee.com/danni3/connect-cas2-client
 * branch            master     -> FETCH_HEAD
fatal: refusing to merge unrelated histories

git pull origin master—allow-unrelated-histories