Wydaj nowy kod w Github

Stworzyłem nowe repozytorium w Github, które ma teraz tylko plik Readme.md.

Mam nowo utworzony projekt RoR, który chciałem przekazać do tego repozytorium. Oto polecenia, które podałem w moim terminalu, aby wykonać to wraz z błędem, który otrzymuję.

git remote add origin https://github.com/aniruddhabarapatre/learn-rails.git

Po czym wpisałem swoją nazwę użytkownika i hasło

git push -u origin master

Błąd ---

To https://github.com/aniruddhabarapatre/learn-rails.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/aniruddhabarapatre/learn-rails.git'
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 merge the remote changes (e.g.,
hint: 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

To jest mój pierwszy raz, kiedy pcham mój kod do repozytorium Github i tracę błędy. Przeszukałem kilka innych pytań, które są tutaj zadawane, ale żaden z nich nie miał problemów po raz pierwszy.

questionAnswers(3)

yourAnswerToTheQuestion