error: src refspec master does not match any error:failed to push some refs to ‘[email protected]:xxxx

once you have a local repository you need to set up a github repository and have both repositories remotely synchronized, the first time you synchronize your code remotely

occurs

git push-u origin master has problems:

error: src refspec master does not match any
error: failed to push some refs to '[email protected]:xxxxxxxx/xxx.git'

cause:

1. If the readme.md is not checked when the remote warehouse is created: commit to the remote library without any content in the staging area. If the empty staging area cannot be committed, add and commit

are required at least once

2. If the readme.md file on github is not in the local directory

resolved:

if question 1:

git add .

git commit -m “commit all local code to origin”

git push -u origin master

if question 2:

Git pull –rebase origin master

this is where you can see the local readme.md file

and now you can do git push-u origin master

Read More: