0

I am just trying to upload my git depository to GitHub and it showed me this message.

error: src refspec depositoryname does not match any.  
error: failed to push some refs to 'https://github.com/<me>/project.git'

I actually am doing step by step tutorial, all should be correct, but it is not.
Is there someone who could help with that?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
K.N.
  • 7
  • 1
  • 3
    We might be able to, but you'll have to provide more detail. Show us the actual commands you ran and the errors or output you got, from which command, otherwise this is going to be impossible to troubleshoot. Please make sure you cut and paste complete error messages - what's in your title is not enough. – joanis Jun 25 '21 at 19:02

1 Answers1

0

As seen here, the error can come from not using git add . before a git commit, which then result in an empty branch.

Trying and push (by default 'main') branch will result in that error message.
5assuming here 'depositoryname' is the name of a branch)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250