我是github的新手。我一直在研究从github获取的代码。现在我完成了我的修改,并且希望将我的代码推送到github。我想创建一个我工作过的原始代码的分支,并将我的开发代码推到那个分支上。然而,当我在开发工作时,原始代码发生了一些变化。所以,当我试图把我的新代码叉我得到以下错误:如何将我的代码推送到github fork
git push original master
To https://github.com/<username>/<projectName>.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/<username>/<projectName>.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.
然后我用
git pull
其输出如下:
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
我可以”从这点开始继续。我应该怎样做我的项目?
他可以通过固定合并挽救他的提交,提交。然后将分叉的报告拖入另一个目录,然后从本地目录合并到本地目录。然后推到他的叉子上。 –