Younès Raoui
Younès Raoui

Reputation: 211

Cannot push onto github

I want to pysh my project to a github repository called luna.git:

I followed the instructions echo “# luna” >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/raouiyounes/luna.git git push -u origin master

But I get this error

error: src refspec master does not match any.
error: impossible de pousser des références vers ‘https://github.com/raouiyounes/luna.git’

Upvotes: 0

Views: 3919

Answers (2)

Adrien Parrochia
Adrien Parrochia

Reputation: 824

You can do :

git push origin HEAD:branch-name

Upvotes: 0

Wilson Vargas
Wilson Vargas

Reputation: 2899

Maybe you just need to commit.

Try this:

git add .
git commit -m "initial commit"
git push origin master

Upvotes: 2

Related Questions