I have finished the 2nd programming assignment in R (Coursera Course).
After that I did relate my local repo to the global repo on my GitHub account then I made a commit and push -u origin master.
But I got the following error:
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/RofaidaG/ProgrammingAssignment2'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Then I made a branch and checkout to the master then pull the repo in my get account but I received the below message:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
How can I proceed?
This will happen if you add a Licence or README file before you push your code into the repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With