[Feature suggestion] Can choose a custom .gitignore file when creating a new repo

I would like to be able to select a custom .gitignore when creating a new repo.


That’s not possible, but you can always create a custom repository template, which would then be available to you whenever you create a new repository:


This relatively new feature is really cool and handsome. I’ve been creating language-specific templates, so that whenever I start a new project in a language which I use often, all the basic scaffolding is in place (repository Git and EditorConfig settings, MIT LICENSE file, a README.md with common reference links for that language, etc.).

Probably that’s your current best option, and since repository templates are available, probably the feature you’re asking for won’t be introduced — picking a custom .gitignore file would entail a templating system of sorts, which is already provided for by GH repository templates, but not limited to any specific files.

1 Like

Creating a template repo is really cool.

So where do the default options for .gitignore files come from? And how does one get added to the list - I use Eclipse PHP as my dev environment and there is no suitable default option - am I the only person using eclipse.

You can check here, https://github.com/github/gitignore.

BTW, mine comes from the accumulation of my daily development.

Ah, thank you very much. That is very helpful and also led me to discover global gitignores which seems to be the answer to my problem
The odd quirk being that I am using GitHub Desktop (on linux) without a local git installed, so I had to manually add the [core] section and the excludesfile = ~/.gitignore_global line to the .gitconfig file in ~/ but it now seems to work.