Linguist: Use .gitattributes to override not work for me.

Created on 24 Aug 2016  路  13Comments  路  Source: github/linguist

Hi:

I readme the readme of linguist and try to use .gitattributes file to override language of my Repo. But it not work right on github, So I install linguist local, and try many kind of format in .gitattributes file but it now work at at all 馃槄.

Has I misunderstood something? If somebody knows, please tell me

Here is my repo VeryNginx.

Most helpful comment

@alexazhou You want the opposite:

verynginx/* linguist-vendored=true

or

*.html  linguist-vendored=true

All 13 comments

What are you trying to achieve?

I want to hide the html part. In fact there is only one very big html file in my Repo, I want linguist to ignore it

The html is

verynginx/dashboard/index.html

I had added a .gitattributes file to the root path of my repo

verynginx/dashboard/index.html linguist-vendored=false

I also tried

verynginx/* linguist-vendored=false
*.html  linguist-vendored=false

but I still can't let it work at all

@alexazhou These are the files that are inflating your repository's language statistics. It looks like they haven't been indexed recently. If you push a change to either one of them, they should disappear from the indexing, because it's forcing GitHub to recalculate that folder's statistics.

@alexazhou You want the opposite:

verynginx/* linguist-vendored=true

or

*.html  linguist-vendored=true

... yeah, that too.

馃槀馃憣 I'll pretend I said that.

@Alhadis

Oh, thanks .

I had commit once on the index.html just now, but nothing changed, do I need to wait a little longer?

@pchaigno

Thanks 锛孖t works after change .gitattributes to

*.html  linguist-vendored=true

I think If the document can be more detail will be very nice

More detailed? You kiddin'? We have enough problems getting people to read the damn thing already. :D

馃槃锛孴hat's ok. It just my personal opinion

@Alhadis I agree with @alexazhou, the documentation could be a _lot_ clearer about how to explicitly exclude entire directories from github's language parsing.

@Alhadis I agree with @alexazhou, the documentation could be a lot clearer about how to explicitly exclude entire directories from github's language parsing.

We'd welcome suggestions/modifications in the form of a pull request.

Sure thing! I think I managed to successfully exclude all files of a certain _type_ from the statistics, but I'm still not clear about how to properly exclude an entire directory. I tried something similar to verynginx/* linguist-vendored=true, but without any success.

@alexweissman That should work. Could you open a new issue with a link to the repository and your goal?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philiparvidsson picture philiparvidsson  路  4Comments

RafaelPAndrade picture RafaelPAndrade  路  4Comments

Haroenv picture Haroenv  路  4Comments

oliviertassinari picture oliviertassinari  路  5Comments

haskellcamargo picture haskellcamargo  路  3Comments