{"thread":{"id":"25663","subject":"first para of man gitignore should refer to 'git rm --cached'","startedAt":"2010-11-07T18:37:48Z","lastAt":"2010-11-09T19:29:13Z","messageCount":6,"participants":["Sitaram Chamarty","Ramkumar Ramachandra","Junio C Hamano","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"155340","messageId":"AANLkTim=QCcJDb0600Je-jePvXSXfFMe7FAQ0WMhZKn7@mail.gmail.com","threadId":"25663","inReplyTo":null,"subject":"first para of man gitignore should refer to 'git rm --cached'","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2010-11-07T18:37:48Z","receivedAt":"2010-11-07T18:37:48Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"It's an FAQ that \"why doesn't my gitignore work\" when the files in\nquestion had already been added earlier, usually in error.  The most\ncommon remedy, I believe, is \"git rm --cached\" followed by a commit.\n\n\"update-index\" does not seem to be the right answer.\n\nThoughts?\n\n-- \nSitaram\n"},{"id":"155342","messageId":"20101107191425.GA32302@kytes","threadId":"25663","inReplyTo":"AANLkTim=QCcJDb0600Je-jePvXSXfFMe7FAQ0WMhZKn7@mail.gmail.com","subject":"Re: first para of man gitignore should refer to 'git rm --cached'","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-11-07T19:14:27Z","receivedAt":"2010-11-07T19:14:27Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Sitaram,\n\nSitaram Chamarty writes:\n> It's an FAQ that \"why doesn't my gitignore work\" when the files in\n> question had already been added earlier, usually in error.  The most\n> common remedy, I believe, is \"git rm --cached\" followed by a commit.\n\nEr, no. The documentation says \"in order to ignore uncommitted changes\nin already tracked files\". `git rm --cached` removes the file from the\nindex altogether- when the change is committed, Git will actually stop\ntracking it.\n\n> \"update-index\" does not seem to be the right answer.\n\n>From the update-index documentation assume-unchanged section, \"This\noption can be also used as a coarse file-level mechanism to ignore\nuncommitted changes in tracked files (akin to what .gitignore does for\nuntracked files)\". It seems to be right.\n\n-- Ram\n"},{"id":"155354","messageId":"AANLkTinznLY3M4z7k-WeeFhGSR1xWHXj_zOrwMvZDfLQ@mail.gmail.com","threadId":"25663","inReplyTo":"20101107191425.GA32302@kytes","subject":"Re: first para of man gitignore should refer to 'git rm --cached'","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2010-11-08T04:46:20Z","receivedAt":"2010-11-08T04:46:20Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"On Mon, Nov 8, 2010 at 12:44 AM, Ramkumar Ramachandra\n<artagnon@gmail.com> wrote:\n> Hi Sitaram,\n>\n> Sitaram Chamarty writes:\n>> It's an FAQ that \"why doesn't my gitignore work\" when the files in\n>> question had already been added earlier, usually in error.  The most\n>> common remedy, I believe, is \"git rm --cached\" followed by a commit.\n>\n> Er, no. The documentation says \"in order to ignore uncommitted changes\n> in already tracked files\". `git rm --cached` removes the file from the\n> index altogether- when the change is committed, Git will actually stop\n> tracking it.\n\nI agree.\n\nI'm just saying that ignoring uncommitted changes to already tracked\nfiles is *not* the most common question I see when it comes to\ngitignore, and am asking if it is worth putting what I believe is the\nreal FAQ in the first para, and move the assume-unchanged stuff\nfurther down the page.\n\nSorry if I didn't say that clearly enough before.\n"},{"id":"155425","messageId":"7vbp5zpo2d.fsf@alter.siamese.dyndns.org","threadId":"25663","inReplyTo":"AANLkTinznLY3M4z7k-WeeFhGSR1xWHXj_zOrwMvZDfLQ@mail.gmail.com","subject":"Re: first para of man gitignore should refer to 'git rm --cached'","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-11-08T20:17:46Z","receivedAt":"2010-11-08T20:17:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sitaram Chamarty <sitaramc@gmail.com> writes:\n\n> I'm just saying that ignoring uncommitted changes to already tracked\n> files is *not* the most common question I see when it comes to\n> gitignore,...\n\nI actually think it is much more commonly asked around here than \"I added\npaths that I do not want by mistake and I mistakenly thought adding it to\ngitignore would make git forget it\".\n"},{"id":"155507","messageId":"AANLkTimwNtih94GENv=RqTCYtTWC7koLV_=WTX-B3MDu@mail.gmail.com","threadId":"25663","inReplyTo":"7vbp5zpo2d.fsf@alter.siamese.dyndns.org","subject":"Re: first para of man gitignore should refer to 'git rm --cached'","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2010-11-09T19:20:21Z","receivedAt":"2010-11-09T19:20:21Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"On Tue, Nov 9, 2010 at 1:47 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Sitaram Chamarty <sitaramc@gmail.com> writes:\n>\n>> I'm just saying that ignoring uncommitted changes to already tracked\n>> files is *not* the most common question I see when it comes to\n>> gitignore,...\n>\n> I actually think it is much more commonly asked around here than \"I added\n> paths that I do not want by mistake and I mistakenly thought adding it to\n> gitignore would make git forget it\".\n\nI'm surprised.  That is something only advanced users are likely to\nneed, while the one I mentioned would appear to be a much more\nneophyte mistake.\n\nPerhaps it's the difference between the folks that come to #git and\nthose that come to the mailing list.\n\nBut case closed I guess...\n"},{"id":"155508","messageId":"20101109192913.GA21320@burratino","threadId":"25663","inReplyTo":"AANLkTimwNtih94GENv=RqTCYtTWC7koLV_=WTX-B3MDu@mail.gmail.com","subject":"Re: first para of man gitignore should refer to 'git rm --cached'","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-09T19:29:13Z","receivedAt":"2010-11-09T19:29:13Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Sitaram Chamarty wrote:\n\n> Perhaps it's the difference between the folks that come to #git and\n> those that come to the mailing list.\n> \n> But case closed I guess...\n\nCase closed?  I thought you were suggesting an enhancement to the\nmanual page, to answer the following question (frequently asked or\nnot):\n\n\tIf git is already tracking a file, how can I tell git\n\tit is not supposed to be tracked any more?\n\nAnd perhaps a bonus question:\n\n\tWhat will happen when I switch between revisions in\n\twhich the file is tracked and not tracked?\n\nI think at least an EXAMPLES section explaining this would be would\nbe nice.\n"}]}