Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add file TextFiles.gitattributes and add folder ".override/" #177

Closed
wants to merge 1 commit into from
Closed

add file TextFiles.gitattributes and add folder ".override/" #177

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 1, 2023

Hello, folks!

I found a closed issue here: github/alexkaratarakis/gitattributes/issues/176 with this old idea.

I would like to know if I've thought about creating a folder called ".override" to add .gitattributes files related to document files like txt, html, markdown, xml etc.

I find this idea interesting and would like to contribute, help.

Have you all ever thought of creating a folder called ".override" to add .gitattributes files related to document files like txt, html, xml, markdown?

This pull-request is the solution to this question. For example, here is a .gitattributes file where I have forced GitHub to count all Txt files towards my language stats, except for readme.md.

Use case: This is very interesting when you have a repository full of text files like blog posts or website content. And you want to show statistics in your repository related to the amount of text you've written. For this use case to be satisfied, it is necessary to use the .gitattributes file with these options configured;

filepath: .override/TextFiles.gitattributes

*.txt linguist-vendored=false
*.txt linguist-generated=false
*.txt linguist-documentation=false
*.txt linguist-detectable=true

why a folder called ".override/"?
The folder ".override" serves to separate source code file vs document file.

img-before
image

img-after
image

where did your idea come from?
I read these 3 links and did something based on it:

Hello, folks!

I found a closed issue here: [github//issues/176](#176) with this old idea.

> I would like to know if I've thought about creating a folder called ".override" to add `.gitattributes` files related to document files like txt, html, markdown, xml etc.

I find this idea interesting and would like to contribute, help.

> Have you all ever thought of creating a folder called ".override" to add .gitattributes files related to document files like txt, html, xml, markdown?

This pull-request is the solution to this question. For example, here is a .gitattributes file where I have forced GitHub to count all Txt files towards my language stats, *except* for readme.md.

Use case: This is very interesting when you have a repository full of text files like blog posts or website content.
@ghost ghost changed the title add TextFiles.gitattributes in .override/ add TextFiles.gitattributes and add folder ".override/" Mar 1, 2023
@ghost ghost changed the title add TextFiles.gitattributes and add folder ".override/" add file TextFiles.gitattributes and add folder ".override/" Mar 1, 2023
@Richienb
Copy link
Member

Richienb commented Jul 16, 2023

The reason for using ,override folder could be better justified.
I think we could just store them in the root, though I'm not sure about that either.

@ghost ghost closed this by deleting the head repository Oct 16, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant