Is there a way to ignore calculating language statistics for a directory on Github?

时间:2015-04-29 00:34:49

标签: github github-linguist

I am currently creating a lot of small experimental game projects in Lua that include a framework written in C, which dominates the code percentages and declares my project as being in C when it is not.

I do however want to keep this framework, as it allows me to add on the playable version of the game.

I am partially familiar with the concept of removing language statistics on a file, but is there a way to omit a directory?

I have also seen most answers link to this answer but as I am new to github I don't quite know how to decipher it.

1 个答案:

答案 0 :(得分:5)

要在计算统计信息时忽略特定目录中的所有文件,可以使用以下.gitattributes

your/framework/directory/* linguist-vendored

如果您认为您的框架通过github.com足够通用,您可以向Linguist发送拉取请求,将其添加到list of ignored directories。这样,您就不需要在每个存储库的基础上忽略它。