From: Jeff King Date: Mon, 03 Jun 2013 20:32:26 GMT Subject: Re: info/exclude not working Message-ID: <20130603203226.GA23224@sigill.intra.peff.net> In-Reply-To: On Mon, Jun 03, 2013 at 01:04:39PM -0700, Devin Rhode wrote: > MBP:dish devin$ cat ../.git/info/exclude > # git ls-files --others --exclude-from=.git/info/exclude > # Lines that start with '#' are comments. > # For a project mostly in C, the following would be a good set of > # exclude patterns (uncomment them if you want to use them): > # *.[oa] > # *~ > models/CAFE.json > dish/models/CAFE.json > > MBP:dish devin$ git status > # On branch master > # Changes not staged for commit: > # (use "git add ..." to update what will be committed) > # (use "git checkout -- ..." to discard changes in working directory) > # > # modified: models/CAFE.json ***Shouldn't appear The exclude mechanism does not mean "do not ever look at this file". It means "when you are adding untracked files, do not include this one". Somebody has already added the file to the repository before your exclude was in place, so it is a tracked file. There is currently no official mechanism in git to do what you want (there are some hacks, but they include many pitfalls). -Peff