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

[RFC/PATCH 0/5] gitignore.5 clarifications

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 7, 2011, 08:04 UTC
Message-ID
<20111107080449.GA30448@elie.hsd1.il.comcast.net>
Hi,

Y.G. noticed that the explanation of '/' handling in the gitignore docs are hard to follow. Worse, it's completely wrong in a number of ways.

Here's a series to fix a few of those.  Impact:
 - remove some complete nonsense (how did I mislead myself into
   thinking patterns without a '/' were anchored?)
 - address the frequently asked question "how do I un-ignore part of a
   directory I have ignored?"
 - relive what seems to be a bug (even when the "foo/" directory is
   ignored, a "git add foo/bar" should add new changes to the index
   when that file is already tracked)
 - some minor clarity improvements

At this point, I can hardly trust myself, so careful review for correctness and clarity would be very welcome.

Incorporates material from http://thread.gmane.org/gmane.comp.version-control.git/170907/focus=170916

Johannes Sixt (1):
  Documentation/gitignore: explain how to un-ignore part of a directory
Jonathan Nieder (3):
  Documentation/gitignore: "foo/" patterns match directories, not files
    under them
  Documentation: clarify effect of '/' in gitignore(5) patterns
  Documentation: unanchored gitignore patterns match basename
 Documentation/gitignore.txt |   48 ++++++++++++++++++++++++++++++------------
 1 files changed, 34 insertions(+), 14 deletions(-)
Next: Jonathan Nieder
Message 1 of 10 in “gitignore.5 clarifications”
  1. 0/5 gitignore.5 clarificationsJonathan Nieder, Nov 7, 2011
  2. 1/4 Documentation/gitignore: "foo/" patterns match directories, not files under themJonathan Nieder, Nov 7, 2011
  3. Nguyen Thai Ngoc DuyNov 7, 2011
  4. Junio C HamanoNov 7, 2011
  5. 2/4 Documentation: clarify effect of '/' in gitignore(5) patternsJonathan Nieder, Nov 7, 2011
  6. Nguyen Thai Ngoc DuyNov 7, 2011
  7. 3/4 Documentation: unanchored gitignore patterns match basenameJonathan Nieder, Nov 7, 2011
  8. Nguyen Thai Ngoc DuyNov 7, 2011
  9. 4/4 Documentation/gitignore: explain how to un-ignore part of a directoryJonathan Nieder, Nov 7, 2011
  10. Nguyen Thai Ngoc DuyNov 7, 2011

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.