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

GitHub の README がトップに表示されないときの直し方(原因と対処まとめ)

Posted at

リポジトリを開いたら 「Add a README」 が出ていて、作った README が表示されない…。
よくある原因と、最短で直す手順を Qiita 用にまとめました。

症状

▪️ リポジトリのトップに README が表示されない

▪️ 代わりに “Add a README” のボタンが出ている

▪️ サブディレクトリ(例:src/README.md)には README がある

原因(結論)

GitHub は「リポジトリ直下(ルート)」の README だけを自動表示する。

サブフォルダ内の README(例:src/README.md)は、そのフォルダに入ったときだけ表示されます。

解決策

ルートに移動する

# 例: src/README.md をルートへ移動
git mv src/README.md README.md
git commit -m "docs: move README to repository root"
git push origin main
0
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
0
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?