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

Re: .git/info/attributes not cloned

From
Jeff King <peff@peff.net>
Date
Mar 27, 2008, 03:33 UTC
Message-ID
<20080327033341.GB5417@coredump.intra.peff.net>
In-Reply-To
<47EB0FAE.5000102@rea-group.com>
On Thu, Mar 27, 2008 at 02:08:30PM +1100, Toby Corkindale wrote:
> If one creates a .git/info/attributes file in a Git repo, it will not be  
> present in cloned repos.
> I don't know if this is a bug or not, but it /seems/ wrong behaviour to  
> me, and reading from the manual pages.

It is not a bug. The .gitattributes file in your working directory _is_ cloned, and that is the right place to put things that you want to be revision-controlled and used in every repo. The .git/info/attributes file is for attributes that are purely local to that repo. This is similar to the split between .git/info/exclude and .gitignore.

Can you point out which part of the manual gave the wrong impression (or better yet, submit a patch making it more clear)?

-Peff
Previous: Toby CorkindaleNext: Toby Corkindale
Message 2 of 13 in “.git/info/attributes not cloned”
  1. Toby CorkindaleMar 27, 2008
  2. Jeff KingMar 27, 2008
  3. Toby CorkindaleMar 27, 2008
  4. Jeff KingMar 27, 2008
  5. Toby CorkindaleMar 27, 2008
  6. Jeff KingMar 27, 2008
  7. [BUG?] git-archive ignores remote .gitattributes (was: .git/info/attributes not cloned)Toby Corkindale, Mar 28, 2008
  8. Johannes SchindelinMar 28, 2008
  9. Jakub NarebskiMar 28, 2008
  10. Johannes SchindelinMar 28, 2008
  11. Jeff KingMar 31, 2008
  12. Junio C HamanoMar 31, 2008
  13. Toby CorkindaleApr 10, 2008

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.