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 it, and now I try to do a push to the remote repository again, but it fails with this message:
Pushing to https://github.com/jjenkov/java-utils To https://github.com/jjenkov/java-utils ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/jjenkov/java-utils' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I am completely new to Git and Github, so maybe I am doing something wrong. I have “fetched” the remote repository into the local one, although the remote repository should be empty (except for a readme file generated by GitHub).
Does anyone know what the problem is, or where I can read a solution?