git push報錯Updates were rejected because the tip of your current branch is behindhtml
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.
解決: git pull origin mastergit
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-historiescentos
參考: http://www.javashuo.com/article/p-tqpikvtn-ed.html https://www.centos.bz/2018/03/git-出現-fatal-refusing-to-merge-unrelated-histories-錯誤/ide