I have tried to follow the solutions suggested in this post but it didnt work and I am still getting: src refspec master does not match any.
Here is what I did: Fo
It happened to me and I discovered that github was trying to verify my account. So you need these 2 commands:
git config --global user.email <your github email>
git config --global user.name <your github username>
This should help you
git init
git add .
git commit -m 'Initial Commit'
git push -u origin master
i have same problem, to solve it, follow these steps
git init
git add .
git commit -m 'message'
git push -u origin master
after this, if you still having that error, follow these steps again
git add .
git commit -m 'message'
git push -u origin master
that worked for me and Hope it will help anyone
By just adding an empty commit will fix issue by using
$ git commit -m "empty commit" --allow-empty
$ git push
// above make empty commit without edit then push
This error is also caused due to an unmatched local branch name.
Make sure that you are giving correct local branch name (check spelling and case sensitivity)
I had the same error because my local branch name was "validated" and was trying to push the changes using git push -f origin validate
, updated that to git push -f origin validated
worked.
Hope this helps.
Only because your local branch does not math the one in your remote repository. git push origin HEAD:master Enable you to ignore the conflict and upload your commit anyway.