githubに新しいレポジトリを作成し、次を実行したら発生しました:
$ git init $ git remote add origin git@github.com:アカウント名/レポジトリ名.git $ git add . $ git push origin master error: src refspec master does not match any. error: failed to push some refs to 'git@github.com:アカウント名/レポジトリ名.git'
問題はコミットしてないことでした。
git commit -m "first commit"
を実行してからgit push origin master
で解決します。