49
30

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Gitでerror: src refspec master does not match anyのエラー

Last updated at Posted at 2020-06-17

git push -u origin masterで初めてのプッシュをしようとした。
(まったくブランチの作成していない状態)

そこで

error: src refspec master does not match any
error: failed to push some refs to 'git@github.com,,,'

まさかのエラー。

原因:コミット忘れてた。

git commit -m "First commit"

このようなエラーが出たらコミットしたか確認してみてください。
以上です

49
30
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
49
30

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?