Ignoring certain files from contributors statistics

I thought I could use the .gitattributes file to ignore files from the contributor statistics:

However, I think I misunderstood, and this is actually only for language stats?

Is there a way to ignore certain files from contributor statistics? For example, committing a package lock file added about 15,000 lines to my contribution statics, although this is obviously misleading, as it is an auto-generated file.

Hi @kiancross :wave:

This is not possible. Users have no control over what is counted towards contributions. Every line of code will be counted.

Thanks for the reply @ernest-phillips. It’s a shame that this isn’t possible, as it makes those stats fairly useless. A lockfile containing 20 thousand lines completely skews the stats and so no insight can be gained from them. Surely lots of other people have this problem - any idea how they deal with it? Is it possible to make feature requests to GitHub?

I am not aware of any workaround for such files. Perhaps others in the community can provide insight there.

You can make a feature request by submitting this through our official product feedback form so that our product team can track your request.