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

Re: gitignore documentation for info/exclude files and patterns with relative directories

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 27, 2026, 16:18 UTC
Message-ID
<xmqqwlyxkzyy.fsf@gitster.g>
In-Reply-To
<Qdk5yVH_yWgKl_bjCjdasusfe3PuzHCZ2rKgKIn2Xx5rcw46jmQDfA6K2vkv3V3XLSy4aqwyUlfVEmF5VlIv3EVEOlZLEnf-paw11tyhZKE=@dandrake.org>
Dan Drake <dan@dandrake.org> writes:
> The documentation should mention this behavior for info/exclude, as well as 
> the core.excludesFile.

Yup, my mistake more than 20-year-old that nobody complained so far ;-)

Yes, these exclude pattern sources that are outside the working tree behave as if they are specified at the root level of the working tree.

Patches welcome. Thanks.
Previous: Dan DrakeNext: Shreyansh Paliwal
Message 2 of 3 in “gitignore documentation for info/exclude files and patterns with relative directories”
  1. Dan DrakeMar 27, 2026
  2. Junio C HamanoMar 27, 2026
  3. doc: gitignore: clarify pattern base for info/exclude and core.excludesFileShreyansh Paliwal, Mar 28, 2026

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.