Re: first para of man gitignore should refer to 'git rm --cached'
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Nov 7, 2010, 19:14 UTC
- Message-ID
- <20101107191425.GA32302@kytes>
- 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