* ignored files stilll listed in git ls-files @ 2009-03-05 1:31 David Shen 2009-03-05 1:41 ` Boyd Stephen Smith Jr. 2009-03-05 9:09 ` Jeff King 0 siblings, 2 replies; 5+ messages in thread From: David Shen @ 2009-03-05 1:31 UTC (permalink / raw) To: git Hi, I add all the files to git before I learned the .gitignore file. Then I remove those unwanted files from the index. But those files still appear in git ls-files. This is really annoying. Is there any want to prevent those ignored files from git ls-files? -- Best Regards, David Shen ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ignored files stilll listed in git ls-files 2009-03-05 1:31 ignored files stilll listed in git ls-files David Shen @ 2009-03-05 1:41 ` Boyd Stephen Smith Jr. 2009-03-05 9:09 ` Jeff King 1 sibling, 0 replies; 5+ messages in thread From: Boyd Stephen Smith Jr. @ 2009-03-05 1:41 UTC (permalink / raw) To: git; +Cc: David Shen [-- Attachment #1: Type: text/plain, Size: 556 bytes --] On Wednesday 04 March 2009 19:31:55 you wrote: > I add all the files to git before I learned the .gitignore file. Then > I remove those unwanted files from the index. But those files still > appear in git ls-files. This is really annoying. Is there any want to > prevent those ignored files from git ls-files? git filter-branch -- Boyd Stephen Smith Jr. ,= ,-_-. =. bss@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/ [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ignored files stilll listed in git ls-files 2009-03-05 1:31 ignored files stilll listed in git ls-files David Shen 2009-03-05 1:41 ` Boyd Stephen Smith Jr. @ 2009-03-05 9:09 ` Jeff King 2009-03-06 14:02 ` David Shen 1 sibling, 1 reply; 5+ messages in thread From: Jeff King @ 2009-03-05 9:09 UTC (permalink / raw) To: David Shen; +Cc: git On Thu, Mar 05, 2009 at 09:31:55AM +0800, David Shen wrote: > I add all the files to git before I learned the .gitignore file. Then > I remove those unwanted files from the index. But those files still > appear in git ls-files. This is really annoying. Is there any want to > prevent those ignored files from git ls-files? If they are appearing in "git ls-files", then you didn't actually remove them from the index. Can you show us exactly which commands you ran, what output they produced, and how it differs from what you expected? -Peff ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ignored files stilll listed in git ls-files 2009-03-05 9:09 ` Jeff King @ 2009-03-06 14:02 ` David Shen 2009-03-06 14:31 ` Jeff King 0 siblings, 1 reply; 5+ messages in thread From: David Shen @ 2009-03-06 14:02 UTC (permalink / raw) To: Jeff King; +Cc: git Thanks for replying. My command was not correct. And I solved my problem with the help from someone else. But my problem is only solved on Linux. On my winodws machine, I have added a lot of unwanted file to my git repo, before creating .gitignore file. I ran 'git rm --cached myfile' to remove it from the index. But they still exist in 'git ls-files', because they exist in the history. On Linux, I can use 'git filter-branch' to remove them from history. But, on windows, On Thu, Mar 5, 2009 at 5:09 PM, Jeff King <peff@peff.net> wrote: > On Thu, Mar 05, 2009 at 09:31:55AM +0800, David Shen wrote: > >> I add all the files to git before I learned the .gitignore file. Then >> I remove those unwanted files from the index. But those files still >> appear in git ls-files. This is really annoying. Is there any want to >> prevent those ignored files from git ls-files? > > If they are appearing in "git ls-files", then you didn't actually remove > them from the index. Can you show us exactly which commands you ran, > what output they produced, and how it differs from what you expected? > > -Peff > -- Best Regards, David Shen ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ignored files stilll listed in git ls-files 2009-03-06 14:02 ` David Shen @ 2009-03-06 14:31 ` Jeff King 0 siblings, 0 replies; 5+ messages in thread From: Jeff King @ 2009-03-06 14:31 UTC (permalink / raw) To: David Shen; +Cc: git On Fri, Mar 06, 2009 at 10:02:03PM +0800, David Shen wrote: > But my problem is only solved on Linux. On my winodws machine, I have > added a lot of unwanted file to my git repo, before creating > .gitignore file. I ran 'git rm --cached myfile' to remove it from the > index. But they still exist in 'git ls-files', because they exist in > the history. On Linux, I can use 'git filter-branch' to remove them > from history. But, on windows, I think filter-branch runs under cygwin (I think it might even run on msysgit, but just hasn't been included in a shipped version yet). You can also filter-branch on Linux and then fetch or clone the result to Windows. -Peff ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-06 14:33 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-03-05 1:31 ignored files stilll listed in git ls-files David Shen 2009-03-05 1:41 ` Boyd Stephen Smith Jr. 2009-03-05 9:09 ` Jeff King 2009-03-06 14:02 ` David Shen 2009-03-06 14:31 ` Jeff King
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).