From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Sitaram Chamarty <sitaramc@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: first para of man gitignore should refer to 'git rm --cached'
Date: Mon, 8 Nov 2010 00:44:27 +0530 [thread overview]
Message-ID: <20101107191425.GA32302@kytes> (raw)
In-Reply-To: <AANLkTim=QCcJDb0600Je-jePvXSXfFMe7FAQ0WMhZKn7@mail.gmail.com>
Hi Sitaram,
Sitaram Chamarty writes:
> It's an FAQ that "why doesn't my gitignore work" when the files in
> question had already been added earlier, usually in error. The most
> common remedy, I believe, is "git rm --cached" followed by a commit.
Er, no. The documentation says "in order to ignore uncommitted changes
in already tracked files". `git rm --cached` removes the file from the
index altogether- when the change is committed, Git will actually stop
tracking it.
> "update-index" does not seem to be the right answer.
>From the update-index documentation assume-unchanged section, "This
option can be also used as a coarse file-level mechanism to ignore
uncommitted changes in tracked files (akin to what .gitignore does for
untracked files)". It seems to be right.
-- Ram
next prev parent reply other threads:[~2010-11-07 19:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-07 18:37 first para of man gitignore should refer to 'git rm --cached' Sitaram Chamarty
2010-11-07 19:14 ` Ramkumar Ramachandra [this message]
2010-11-08 4:46 ` Sitaram Chamarty
2010-11-08 20:17 ` Junio C Hamano
2010-11-09 19:20 ` Sitaram Chamarty
2010-11-09 19:29 ` Jonathan Nieder
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101107191425.GA32302@kytes \
--to=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=sitaramc@gmail.com \
/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.
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 NNTP newsgroup(s).