On Tuesday, June 24, 2014 8:40:17 PM UTC+2, Mark Bannister wrote:
> Noobie here
> I am using Git on an ubuntu box, but I am working with Window's files on a
> Samba network server.
> I have all kinds for problems with case. The files I'm handling I have to
> treat as binary and the software sometimes arbitrarily changes the file
> name's case (old software, long story).
> I have Git ignoring case (but evidently not correctly) and it gets
> confused as to when a file is deleted or just renamed. I have to be very
> careful that files get added to the branch as renamed and not deleted.
> Bottom line is I messed up, changed a file in a branch, then got it
> deleted (either by rm or by committing as deleted not sure).
> I have found previous versions of the file "git log -- filename", but I
> can't seem to find a version that is the one I want.
> So, if I rm deleted it while making changes in a branch, then committed
> are the changes gone?
Every file which was ever committed is likely to be retrievable, even if
the branches where they were made have since been removed. Just take care
not to delete the folder with your repository in it.
You need to tell us more about what you did to the file if you want more
advice on how to get it back out. In short, doing a git checkout on the
file for every revision it was changed is the way to search. If the history
is very large, but you can make some script that checks whether it has the
state you want, you can look into git bisect for finding the right version.
Also, remember that Git doesn't track renames. It compares file contents to
look for renames at the moment you run git log, so if these binary files
change completely, Git will not follow the renames properly, and you need
to start inspecting the commits more closely/manually, find the new
filenames, and then do a new git log with the different file name, tracing
further back in time.
Have a look at the git log docs, especially the --follow
> 2.) I've tried a few methods of setting case ignore and maybe the issue is
> I've got too many things going on. Is there an ideal way to make git
> ignore case everywhere I am working with this repository?
The short answer is no.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.