Error in Git, I can not push

3

I was giving push and this error occurred:

error: src refspec master does not match any.

What causes it? Could someone help me?

    
asked by anonymous 23.03.2018 / 15:38

1 answer

0

Possible causes for this error:

  • The branch in question does not exist . This can occur if you spell the branch name wrong and try to give a push to it.
  • The branch in question exists but does not exist locally on your machine . To resolve, make checkout to branch before doing push .
  • You may have forgotten to commit the file before push . Remembering that in Git, it is not possible to do push of empty directories, which can lead to the same error as well.
  • You have checkedout for a specific commit (thus in mode detached HEAD ) and is trying to give git push . To resolve, you can checkout back to branch or git push origin HEAD:nome-branch
22.08.2018 / 13:49