我是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'.
我可以」從這點開始繼續。我應該怎樣做我的項目?
他可以通過固定合併挽救他的提交,提交。然後將分叉的報告拖入另一個目錄,然後從本地目錄合併到本地目錄。然後推到他的叉子上。 –