git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Devin Rhode <drhode@amobee.com>
Cc: git <git@vger.kernel.org>
Subject: Re: info/exclude not working
Date: Mon, 3 Jun 2013 16:32:26 -0400	[thread overview]
Message-ID: <20130603203226.GA23224@sigill.intra.peff.net> (raw)
In-Reply-To: <CALy29pLQ-LWg0knzbzLoQfwSt+df_b3tNdWk7OeSN-CjkJhfsQ@mail.gmail.com>

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 <file>..." to update what will be committed)
> #   (use "git checkout -- <file>..." 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

  reply	other threads:[~2013-06-03 20:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 20:04 info/exclude not working Devin Rhode
2013-06-03 20:32 ` Jeff King [this message]
2013-06-03 20:44   ` Devin Rhode

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130603203226.GA23224@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=drhode@amobee.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).