第一次尝试 Github 推送时出现以下错误:
[rejected] master -> master (non-fast forward)
error: failed to push some refs to 'git@github.com:me/me.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'non-fast forward'
section of 'git push --help' for details.
我该如何解决这个问题并 merge 远程更改?
最佳答案
请参阅“git push --help”的“非快进”部分' 了解详情。
You can perform "git pull", resolve potential conflicts, and "git push" the result. A "git pull" will create a merge commit C between commits A and B.
Alternatively, you can rebase your change between X and B on top of A, with "git pull --rebase", and push the result back. The rebase will create a new commit D that builds the change between X and B on top of A.
关于git - 如何在 GitHub 上 merge 远程更改?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1713137/