Skip to content

Instantly share code, notes, and snippets.

@pebriana
Created March 4, 2016 02:51
Show Gist options
  • Select an option

  • Save pebriana/b3a08c1d9137c5fbbb0a to your computer and use it in GitHub Desktop.

Select an option

Save pebriana/b3a08c1d9137c5fbbb0a to your computer and use it in GitHub Desktop.
error: src refspec master does not match any. error: failed to push some refs to 'ssh://xxxxx.com/project.git'
http://stackoverflow.com/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git?answertab=votes#tab-top
Maybe you just need to commit. I ran into this when I did:
mkdir repo && cd repo
git remote add origin /path/to/origin.git
git add .
Oops! Never committed!
git push -u origin master
error: src refspec master does not match any.
All I had to do was:
git commit -m 'initial commit'
git push origin master
Success!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment