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

Git Ignore Exception bug

From
NWNathan Williams <nwilliams@sofi.org>
Date
Sep 9, 2016, 21:39 UTC
Message-ID
<CAC5iUd2mS1n1=sRB=Bs6tn3L3raAXrZaEcs765UFtQZB9XZuYg@mail.gmail.com>
it ignore doesn't seem to be working properly when adding exceptions.
Environment:
Mac, running latest El Capitan (10.11.6)

% git --version git version 2.9.0

-----------cut here------------- #!/bin/sh TEMP=mktemp

# Create a temporary repo mkdir repo cd repo

git init

echo "foo/*" >> .gitignore echo "!foo/bar" >> .gitignore git add .gitignore git commit -m "Ignore file with exceptions"

# Create the directory structure mkdir foo mkdir foo/bar

# Create files to be ignored touch foo/1 touch foo/2

# Create files that should be identified touch foo/bar/a touch foo/bar/b

# Should ignore foo and indicate that all the files in foo/bar are un-committed git status

# Move back to the regular directory cd .. -----------cut here-------------

Expected results
% git st
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        foo/bar/
Nate
Next: Dennis Kaarsemaker
Message 1 of 2 in “Git Ignore Exception bug”
  1. Nathan WilliamsSep 9, 2016
  2. Dennis KaarsemakerSep 14, 2016

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.