All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Tech Kenya <techkenya@protonmail.com>,
	 "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Suggestion: Enhance git init with Language-Specific Templates
Date: Wed, 05 Mar 2025 14:52:49 -0800	[thread overview]
Message-ID: <xmqq1pvbks3i.fsf@gitster.g> (raw)
In-Reply-To: <Z8jTjt1CQ7hp8KSP@tapette.crustytoothpaste.net> (brian m. carlson's message of "Wed, 5 Mar 2025 22:43:26 +0000")

"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> What Git _does_ provide is a way to create a template of objects that
> should be in the `.git` directory using the `--template` option.  It's
> possible to create a template that contains an initial commit with a
> `.gitignore` file.  I personally would not recommend this approach,
> since it will not work gracefully with alternate ref formats or hash
> algorithms, but it is an option for people who want to use it.  This was
> in common use for setting up the default branch name before `git init`
> added the `-b` option and it's related config, so it is well tested.

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.

Thanks.

  parent reply	other threads:[~2025-03-05 22:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 11:49 Suggestion: Enhance git init with Language-Specific Templates Tech Kenya
2025-03-05 22:43 ` brian m. carlson
2025-03-05 22:50   ` rsbecker
2025-03-05 22:52   ` Junio C Hamano [this message]
2025-03-05 23:53     ` Oleg Taranenko
2025-03-05 23:56       ` Junio C Hamano
2025-03-06  0:04         ` Oleg Taranenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq1pvbks3i.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    --cc=techkenya@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.