无法在git上推送代码?

时间:2013-10-05 05:44:11

标签: git github

error: failed to push some refs to 'git@173.255.206.222:apal.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.

1 个答案:

答案 0 :(得分:2)

您需要先从远程服务器提取更改,然后才能推送更改。因此,您应该git pull --rebase在远程更改之前修改您的更改。然后你可以推。