error while doing git push

Asked

Viewed 1,348 times

0

I’m trying to upgrade a project to github but always q dou git push this error:

error: src refspec master does not match any error: failed to push some refs to 'https://git.heroku.com/saralvanderia.git'

  • 1

    Have you already pointed to the remote branch with git remote add? It asks the commands you ran until you got to git push. This error is generic, so it is necessary to know how you created Reset to find out the cause of the problem.

2 answers

0

Try git commit -m "primeiro commit" and then try git push -u origin master again. For more information take a look here.

I hope I’ve helped.

0


welcome to Stackoverflow. I believe your problem is in relation to the branch name local different from the branch name remoto. If this is the problem, the error is being generated because you are trying to give a push in a branch that does not exist in your repository.

Check using the command git show-ref (list the local references) and the git ls-remote (list the remote references). A case also that can generate this error is the fact that you have not made your first commit before performing the push.

There is already a question created about this error with some other answers that may help you solve the problem. Click here on this link: problem-to-publish-project-github

  • opa esse outro post ajudou me. Vlw!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.