我是 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'.
我不能从这一点上继续。我应该怎么做才能提交我的项目?