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

.gitignore Bug Report on the behavior of *

From
SRSeth Robertson <in-gitvger@baka.org>
Date
Sep 25, 2010, 19:23 UTC
Message-ID
<201009251923.o8PJNJYE031841@no.baka.org>

I'm not sure if this is a documentation bug, an actual bug, or my mis-interpretation of what is supposed to happen, however, this behavior was not expected by other people as well. This was tested using git 1.7.2.3 and 1.7.3

My sample configuration: ---------------------------------------------------------------------- mkdir foo; cd foo; git init; echo A > A; mkdir B; echo B > B/B git add .; git commit -a -m "initial" ----------------------------------------------------------------------

# Properly shows X and B/XX as untracked, as I expected echo X > X; echo XX > B/XX; git status

# I expected B/XX to show up as untracked rm -f .gitignore B/.gitignore echo '*' > .gitignore; echo '!*' > B/.gitignore; git status

# I expected B/XX to show up as untracked rm -f .gitignore B/.gitignore echo '/*' > .gitignore; git status

# Works as I expected rm -f .gitignore B/.gitignore echo '/*X' > .gitignore; git status

# Works as I expected rm -f .gitignore B/.gitignore echo '*X' > .gitignore; echo '!*X' > B/.gitignore; git status

# Works as I expected rm -f .gitignore B/.gitignore echo -e '/*\n!/B' > .gitignore; git status

					-Seth Robertson
Next: Johannes Sixt
Message 1 of 5 in “.gitignore Bug Report on the behavior of *”
  1. Seth RobertsonSep 25, 2010
  2. Johannes SixtSep 25, 2010
  3. Re: .gitignore Bug Report on the behavior of *Seth Robertson, Sep 25, 2010
  4. Ævar Arnfjörð BjarmasonSep 25, 2010
  5. Sverre RabbelierSep 25, 2010

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.