Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 649
Dizzykiwi Avatar asked Apr 29 '15 00:04

Dizzykiwi


1 Answers

This will ignore all the files in the given folder and subfolders from the stats.

linguist-vendored: This attribute helps us exclude files from stats.

In the .gitattributes file:

folder_to_ignore_files_from/** linguist-vendored

For e.g. I had a static_root folder in my root directory from which I wanted to ignore files from. So,

static_root/** linguist-vendored

I had created the .gitattributes in root directory.

Ref: link

like image 160
Sukhdeep Avatar answered Sep 28 '22 07:09

Sukhdeep