Just do IT

思うは招く

git pull origin master → Couldn't find remote ref master エラーを解決

問題

git pull origin masterをすると、以下のエラーが表示される。

fatal: Couldn't find remote ref master

「リモートにmasterブランチは存在しません」という意味のエラーだ。しかし、GitHubには確実にリポジトリは存在している。

解決

GitHubの仕様変更で、「masterブランチ」が「mainブランチ」に名前が変わっていたのが原因だった。

#解決
$ git checkout main
$ git pull origin main

これは盲点だった。

個人的には master よりも main のほうがタイピングしやすくてラクになった印象があるなー。