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

Re: dotfiles in git template dir are not copied

From
Jeff King <peff@peff.net>
Date
Feb 17, 2017, 20:44 UTC
Message-ID
<20170217204411.2yixhuazgczxmmxa@sigill.intra.peff.net>
In-Reply-To
<ebd661c3-7d99-54d2-dda9-09c4a76cfe93@greg0ire.fr>
On Fri, Feb 17, 2017 at 10:31:37AM +0100, greg0ire wrote:
Show 7 quoted lines
> I noticed yesterday that dotfiles inside the directory configured in
> init.templatedir are not copied when creating a new repository.
> 
> Here is the line I think is responsible for this behavior :
> https://github.com/git/git/blob/master/builtin/init-db.c#L48
> 
> Is it a bug or a feature?

I think it's probably a feature. You could, for example, have your template directory itself be a git repository. You would not want to copy the ".git" directory around.

I wouldn't be surprised if the documentation could be improved, though.
-Peff
Previous: greg0ireNext: Grégoire PARIS
Message 2 of 12 in “dotfiles in git template dir are not copied”
  1. greg0ireFeb 17, 2017
  2. Jeff KingFeb 17, 2017
  3. Grégoire PARISFeb 17, 2017
  4. Junio C HamanoFeb 17, 2017
  5. Grégoire PARISFeb 17, 2017
  6. Junio C HamanoFeb 17, 2017
  7. Grégoire PARISFeb 17, 2017
  8. Philip OakleyFeb 17, 2017
  9. Grégoire PARISFeb 17, 2017
  10. Junio C HamanoFeb 17, 2017
  11. Grégoire PARISFeb 17, 2017
  12. Grégoire PARISFeb 17, 2017

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.