GitHub – Manually Setting GitHub Languages

github

GitHub appears to auto-detect the project language type. However, it has failed on a couple of mine.

Is there a way to set that manually, or is there some keyword/phrase I should set to trigger it?

I'd presumed it goes by file extension as it properly detects my Modula-2, Propeller Spin, and Java repos. However, it only identifies about half my Assembly repos properly (and they all have .asm files).

Best Answer

You can use a .gitattributes file to add or override filename and extension patterns (or vi/emacs lines).

*.ASM linguist-language=Assembly

Github's code library responsible for file type statistics and syntax highlighting selection is called Linguist. You can open a pull request for a change to languages.yml if you believe that you are not the only one affected by this case sensitivity problem.

Assembly: type: programming color: "#6E4C13" aliases: - nasm extensions: - ".asm" - ".a51" - ".inc" - ".nasm" tm_scope: source.assembly ace_mode: assembly_x86 language_id: 24