我得到以下错误,首先尝试Github push:
[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.如何解决这个问题并合并远程更改?
I'm getting following error, whn trying first Github push:
[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.how can I fix this and merge remote changes?
最满意答案
有关详细信息,请参阅“ git push --help ”的“非快进”部分。
您可以执行“git pull”,解决潜在的冲突,并“git push”结果。 “git pull”将在提交A和B之间创建一个合并提交C。
或者,您可以使用“git pull -rebase”将您在A和X之间的更改重新移动,并将结果推回。 rebase将创建一个新的提交D,在A之上构建X和B之间的更改。
See the 'non-fast forward' section of 'git push --help' for details.
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.
更多推荐
发布评论