I am new to github. I have been working on a code that I fetched from github. Now I completed making my modifications and I want to push my code to github. I would like to create a fork of the original code that I worked on and push my developed code over that fork. However while I was working on development there has been some changes at the original code. So when I try to push my new code to the fork I get the following error:
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.
Then I used
git pull
which outputted the following:
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'.
I can't continue from this point on. What should I do to commit my project?