git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Suggestion: Enhance git init with Language-Specific Templates

From
Oleg Taranenko <olegtaranenko@gmail.com>
Date
Mar 5, 2025, 23:53 UTC
Message-ID
<CABEd3j-36C_LUOetg0qLofrby9M1Hixkh4o7sQkkyyWuTqHQvQ@mail.gmail.com>
In-Reply-To
<xmqq1pvbks3i.fsf@gitster.g>
On Wed, 5 Mar 2025 at 23:53, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> 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.

--Oleg
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “Suggestion: Enhance git init with Language-Specific Templates”
  1. Tech KenyaMar 4, 2025
  2. brian m. carlsonMar 5, 2025
  3. rsbecker@nexbridge.comMar 5, 2025
  4. Junio C HamanoMar 5, 2025
  5. Oleg TaranenkoMar 5, 2025
  6. Junio C HamanoMar 5, 2025
  7. Oleg TaranenkoMar 6, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.