This question already has an answer here:
-
*
/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git
/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git
38 answers
Answers
http://stackoverflow.com/a/10080621/6309 http://stackoverflow.com/a/10080621/6309
git remote rm origin
Then I recreated the origin, making sure the name of my origin was typed EXACTLY the same way my origin was spelled.
git remote add origin git@....
You can simplify with:
git remote set-url origin git@....
Then you can establish a tracking link between the local branch and the remote tracking branch:
git push -u origin master
You can also push it to a different branch on origin:
git push -u origin master:anotherBranch
Source
License : cc by-sa 3.0
http://stackoverflow.com/questions/10568641/git-error-src-refspec-master-does-not-match-any