! [rejected] xxxx-> xxxxx(non-fast-forward)
error: failed to push some refs to ‘ssh:/xxxxxx/.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本地仓库的当前版本低于远程仓库的版本(大白话就是:你在github上进行的修改没有同步到本地git仓库中)。
解决命令
git pull origin master(master是出现问题的分支名)
然后就是add,commit,push命令将本地的修改上传到远程仓库中