Github-Updates were rejected because the remote contains work that you do not have -how to push my work to git hub
I created a new repo, cloned it, added files to the directory, added them with add -A, committed changes, and when I try to push using git push
"Updates were rejected because the remote contains work that you do not have".
This doesn't seem to make sense since it's a new repo and contains only a readme file.
The hint: updates were rejected because the remote contains work that you do error occurs if you initialize a new git-hub repository so to resolve this issue you need to add the remote and pull the changes again for that use the following commands.
git remote add origin [//your github url]
git pull origin master
git push origin master