-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git filters are sometimes case sensitive on case insensitive file systems #1537
Comments
That's what it looks like. |
@technoweenie See the last example in the repo. If I track first and add later everything works OK. |
Doh, there it is. The
I wonder if |
I just hit this bug... huge issue on Windows! Took forever to fix it. Had to uninstall Git-LFS then pull, then re-install git-lfs then pull again. |
Hello. I ran into this issue when tracking binary files using LFS on windows, but I don't think it is a bug. I was able to address the issue using glob patterns that work in .gitignore and .gitattributes files. For example, to track If you don't want to modify the .gitattributes file directly, you could use the command Either method results in the following line in the .gitattributes file: If you already have files tracked in the repository and need to apply the new .gitattributes, you can do that using the following procedure. For example, lets say you already committed a bunch of
|
Thanks for the great summary @douglasbr ! Glob patterns are the way to go on case insensitive file systems 👍👍 I touched on a few other tricks in my Git LFS talk too (patterns start around 13:40): |
I agree with @larsxschneider, and I think that this issue can be closed. Please don't hesitate to ping either of us if you have any trouble in the future. Thanks! |
@larsxschneider Thank you for the hints and the video. I've just hit the issue myself :)
|
Question: if I use some |
The existing patterns in |
@douglasbr if I do the steps you mentioned, does that double the amount of space taken in the remote repository (i.e. the files stay in the commit history but also added as duplicates to the lfs storage)? |
@AnomalousUnderdog To the best of my understanding, the steps I outlined do not remove the binary files from your commit history. They are only removed from the index and moved into LFS storage. So, it would double the total amount of storage (assuming you only had one version of your binaries previously committed). If you wanted to go back into your commit history and actually remove the files from your repository's history, that would take more work. How deep you go into your history would also depend on how long you have been committing binaries and which versions you are willing to delete. |
Setup
Steps to reproduce
Expected behavior
A clean working directory.
Actual behavior
Weird for the user:
As a user you would think that somehow your file was changed. If you run
git checkout -- upper.DAT
to discard any changes (as Git instructs you) nothing will happen.What is going on?
The
git add .
after thegit lfs track "*.dat"
movedlower.dat
to Git LFS, but notupper.DAT
(although it should as this is a case insensitive file system):If you add the
dat/DAT
files after you track the files in LFS then everything works as expected:My hunch is that the root of the problem is located in Git core.
What do you think?
The text was updated successfully, but these errors were encountered: