I have created a Git repository on GitHub, and a local repository too. First I pulled the remote repository into the local one. Then I added a file, staged the file, committed i
The remote repo is not empty; it contains a README that you probably created through the GitHub web interface. You have to pull it before you can push to it:
git pull --rebase origin master
git push
(The --rebase is not strictly necessary but avoids an ugly merge commit.)