Incorrect language shown for repository #191651
-
🏷️ Discussion TypeQuestion BodyI'm not sure if this is a bug or not, but I noticed that for one of my repositories, an incorrect language seems to be shown in the stats. Specifically, my repo CompStart shows the following as the language breakdown for the project: However, when I click on HTML, there are no code files. This makes sense since the project is all Python, PowerShell, and Batch. The HTML content seems to be from 55 issues and 3 pull requests. Here's a screenshot: In some of my Markdown files, I have used HTML elements, notably So, I don't know if this is a bug or if there's a way to not have issues and PRs included in the language breakdown. Any ideas? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
1. Force the correct main languageIn your repo root, create or Then:
GitHub will recompute the language in a few minutes. 2. Hide misleading files from statsIf HTML / CSS / logs are dominating, ignore them: Commit and push again; the language bar will update. 3. If it still looks wrong
|
Beta Was this translation helpful? Give feedback.
-
|
Hello! To answer your specific question: No, GitHub does not count Issues, Pull Requests, or Comments in its language statistics. The tool GitHub uses (called Linguist) only calculates stats based on the actual files committed to your repository's default branch. If HTML is showing up as the dominant language, it isn't coming from To fix this, you don't need to change your code. You just need to tell Linguist to ignore those specific files so your Python and PowerShell stats shine through. How to fix it:
Note: It might take a few minutes or a browser refresh for the language bar to recalculate and update. Let me know if this fixes it for you! |
Beta Was this translation helpful? Give feedback.
-
|
Issues, PRs, and markdown content don't count toward language stats. Linguist only looks at actual committed files in the repo. So if HTML is showing up with a significant percentage, there's a real file in your repo that Linguist is picking up. Could be something you forgot was there: a generated HTML report, a docs folder, or a large file that got committed at some point. You can find it quickly with: git ls-files | grep -i "\.html"Once you know what it is, add it to Or if it's a whole directory (like a
Push the |
Beta Was this translation helpful? Give feedback.


Issues, PRs, and markdown content don't count toward language stats. Linguist only looks at actual committed files in the repo.
So if HTML is showing up with a significant percentage, there's a real file in your repo that Linguist is picking up. Could be something you forgot was there: a generated HTML report, a docs folder, or a large file that got committed at some point. You can find it quickly with:
Once you know what it is, add it to
.gitattributesin your repo root:Or if it's a whole directory (like a
docs/ordist/folder):linguist-vendoredremoves the path from stats entirely, useful …