2016 December 29

Git error: src refspec master does not match any

Point 1) Check if you have followed the below sequence of steps when setting up git in your local workstation

$ git init

$ git add .

$ git commit -am “name of the commit”

$ git remote add origin https://github.com/username/repository.git

$ git push -u origin master

Point 2) Check if .git/config file has the following parameters in it

[branch “master”]

remote = origin

merge = refs/heads/master

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn