输入指令:
git pull origin master --allow-unrelated-histories
git push -u origin master
异常为:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://git@*****.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 --rebase origin master
查看是否有需要再进一步的commit一下,解决一些冲突。
然后输入指令:
git push -u origin master -f