`Creating a new repository` doesn't mention gitignore templates
Code of Conduct
- [x] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository#creating-a-new-repository-from-the-web-ui
What part(s) of the article would you like to see updated?
Some reference explaining how/what the gitignore template thing works
Additional information
https://github.com/new
- https://github.com/community/community/discussions/168451
https://github.com/github/docs/issues/39758
https://github.com/github/docs/issues/new/choose
@jsoref Are you proposing adding another line to the list in that section, maybe with a link to REST API endpoints for gitignore? I don't know how useful that link is because I don't actually understand most of it, but I notice the link to Ignoring files is in there, at least.
I didn't know about that, so I wasn't proposing it, but, yes, that seems like the perfect think to reference.
Haha
Op di 12 aug 2025 om 02:04 schreef Josh Soref @.***>
jsoref left a comment (github/docs#39758) https://github.com/github/docs/issues/39758#issuecomment-3177245378
I didn't know about that, so I wasn't proposing it, but, yes, that seems like the perfect think to reference.
— Reply to this email directly, view it on GitHub https://github.com/github/docs/issues/39758#issuecomment-3177245378, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3AP7KCJ2OC6S3KBV76HTIT3NEVQNAVCNFSM6AAAAACDQVS72KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCNZXGI2DKMZXHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I'm so scatterbrained, I forgot to update the tags yesterday. Well, anyway, I'll put a help wanted label on this. Should be a simple fix for whoever wants to do it.
Sigh. I'm scatterbrained too and can't figure out how to fix this.
The current text is approximately this:
You can create a .gitignore file, which is a set of ignore rules. For more information, see Ignoring files.
Which is mostly wrong/unhelpful, since you can't really do that. You can create a .gitignore file based on a template (from github/gitignore).
The page you found (https://docs.github.com/en/rest/gitignore/gitignore?apiVersion=2022-11-28) says:
When you create a new repository on GitHub via the API, you can specify a .gitignore template to apply to the repository upon creation.
Which is way more helpful/accurate than the current text I'm complaining about.
Then there's https://docs.github.com/en/get-started/git-basics/ignoring-files (which is linked from both the page subject to this ticket and the url you found) which says:
https://github.com/github/docs/blob/6258abac0656c0b6929478b4e8a0e05964d66e6b/content/get-started/git-basics/ignoring-files.md?plain=1#L22
Which violates "Don't repeat yourself" (DRY).
Personally, I'd rather that page said:
GitHub maintains an official list of recommended
.gitignorefiles for many popular operating systems, environments, and languages in the github/gitignore public repository. You can also use gitignore.io to create a.gitignorefile for your operating system, programming language, or IDE.
It also says to touch a nonexistent file:
https://github.com/github/docs/blob/6258abac0656c0b6929478b4e8a0e05964d66e6b/content/get-started/git-basics/ignoring-files.md?plain=1#L28-L30
but doesn't suggest git adding the file..., which makes it a really lousy place to link to from a place about repository stuff.
In trying to figure out what this feature does, I left some other notes...
- https://github.com/community/community/discussions/164980#discussioncomment-14084975
- https://github.com/community/community/discussions/164980#discussioncomment-14085138
- https://github.com/community/community/discussions/164980#discussioncomment-14085237
Basically
- you can only select one template,
- it must be a top level template file
- globally useful ignores are not included 😞
- items in the list are sorted case-sensitively (but, there's a type to filter box, and the filtering remains in effect after you selet something, which is confusing when you later change your mind).
Anyway, I'm going to replace the current text with text closer to the page you found and link to the page you found, since I believe that's a significant improvement over the current link (and people can still get there from the page you found).
@jsoref So, here's what's going on: the repositories team doesn't like the update you and I came up with, they would prefer the docs team add a little section on templates to the overview article that's already linked, and then link to more information from there. I think that's what's going to happen, but there's still some discussion going on, and in any case, we're going to make the issue internal and figure out how to fix it ourselves.
Thank you for opening this issue! Updates to this documentation must be made internally. I have copied your issue to an internal issue, so I will close this issue.