1
1

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】Languages割合を修正する

Last updated at Posted at 2025-04-05

はじめに

Vite + React + TypeScriptプロジェクトを作成、GitHubに連携したところ、languageの割合のCSSが非常に高いため、修正を試みました。

問題

GitHubのプロジェクトがCSSプロジェクトとみなされている。Languagesの割合も高い。

image.png

image.png

解決方法

.gitattributesを使用して、CSSを言語統計から除外する

  • プロジェクトのルート配下で.gitattributesファイルを作成する
$ touch .gitattributes
  • CSSを言語統計から除外するよう.gitattributesに記載
.gitattributes
*.css linguist-documentation
  • commit、pushする

  • 変更が反映されたことを確認

image.png

image.png

おわりに

Linguist
を使用して統計を出していることを学びました。

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?