1
0

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 pushでのerror "src refspec main does not match any"

Posted at

rails学習中につき、よくやってしまうので備忘録として残しておきます。
私と同じような初学者の方の参考になれば幸いです。

% git push -u origin main

を実行したときにこのようなエラーが出たら

error: src refspec main does not match any
error: failed to push some refs to 'https://github.com/[githubアカウント名]/[githubリポジトリ名].git'

mainをmasterに変えて

% git push -u origin master

を実行すればよい!

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?