Oleg Taranenko <olegtaranenko@xxxxxxxxx> writes: > On Wed, 5 Mar 2025 at 23:53, Junio C Hamano <gitster@xxxxxxxxx> wrote: > >> I wouldn't have thrown objects in the --template directory, and I >> wouldn't count on things outside what the mechanism was invented for >> (namely, .git/hooks and possibly .git/info/ files) would forever be >> copied in newer versions of Git, but certainly "git init --template" >> mechanism sounds like a good escape hatch than mucking with Git code >> base to teach it myriad of languages and their dialects. > > It sounds like creating a copy of the .gitignore structure requires > the user to learn bash script syntax. :-D I'd like to suggest adding > one more option to the init --template <template/dir> > --only-gitignores. It will not deal with all the complicated mechanics > behind hooks/etc, and will only look at the template folder structure > and copy **/.gitignore into the newly created worktree. In case of > existing .gitignore files, just put warnings and do not override > those. I was referring to .git/info because of the .git/info/excludes file.