[Top][All Lists]

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

Re: deleting invisible files in git

From: Graham Percival
Subject: Re: deleting invisible files in git
Date: Fri, 16 Feb 2007 15:00:58 -0800
User-agent: Thunderbird (Macintosh/20061207)

Johannes Schindelin wrote:

On Fri, 16 Feb 2007, Graham Percival wrote:
Those were added by mistake; I've since added similar files with lowercase
first letters (page-*, proportional-*).  However, I can't see the Upper Case
.ly files in my git directory.

I have the slight suspicion that you have a case challenged file system (happened to me on MacOSX, too). Just try "ls" with the Upper Case name (even if it displays the names with lower case when you say "ls" without filenames).

That's not it.  I can see capital letters; besides,

tsubasa:~/usr/src/lilypond/input/lsr/spacing gperciva$ ls Page*
ls: Page*: No such file or directory
tsubasa:~/usr/src/lilypond/input/lsr/spacing gperciva$ ls         

If you look here:;a=tree;f=input/lsr/spacing;h=91044a39cc159cd8b403b860d9cde6ead1b19de7;hb=HEAD

(icky link; it's the input/lsr/spacing/  dir in the git tree)
you can see the Page* and Spacing* files.

but now I can't get rid of them.

Okay, this is a little obscure, but can easily be done:

        git rm --cached <filename>

(This _needs_ Git 1.5.0). You need to say "--cached" so it does not actually remove the file in the working directory (since you can access it using the other spelling).

Argh, fink only has  Oh well.  :(

Then, just check with `git status` that all is well, and if it is, just say `git commit`. This will remove the unwanted files from the revision.

That's the weird thing -- "git status" claims that all is well, even though I don't have Page* in my directory. I've even tried deleting the dir and checking it out again; I still don't get the Page* files. But according to the web git interface, they're definitely in the tree.

- Graham

reply via email to

[Prev in Thread] Current Thread [Next in Thread]