Re: first para of man gitignore should refer to 'git rm --cached'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]