I want to send my code to my remote repository but I have a problem when doing push from my Git console.
Once I have added all my income, my password https :
git remote add origin https://github.com/...
then it is necessary to do push then login:
git push origin master
but I get the following accompanied by an error:
To link
! [rejected] master - > master (fetch first)
error: failed to push some refs to ' link ...'
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.
tells me that I do not have it locally, so I put:
git remote --v
to see if I was targeting the remote repo (since I could not think of a solution) and I was effectively pointing to it.
It does not let me go from local to remote my code.
Does anyone know what is happening or what am I doing wrong?
I hope you can help me. Thank you very much.