Git is renaming file names while executing "git checkout" command

788 views
Skip to first unread message

Itay

unread,
Feb 5, 2019, 6:24:05 AM2/5/19
to git-for-windows
The Problem: File names are being renamed while executing "git checkout" command. 

Description: Whenever i'm (or my colleagues are) trying to switch branches using "git checkout", uppercase file names are being converted (decapitalized) to lowercase - the issue occurs while attempting to switch branches over Windows platform. Test has been made to restore the problem using Unix platform - unsuccessfully. Our guess is that the problem derived due to the "case-insensitive" behavior of Windows OS. We have been trying to execute the git config core.ignorecase command as well as hardcoding in the config file, but again, unsuccessfully. 

Git version: 2.13
Looking forward to your reply,
Itay

Philip Oakley

unread,
Feb 5, 2019, 12:55:11 PM2/5/19
to Itay, git-for-windows
This is a know "Issue", of the sort that we can't really fix, because it
is part of the semantic differences between the POSIX and Windows File
Systems (FS's) views of the world.

Git is at its core a distributed versioning system for Linux/Posix
systems. Thus the primary case will be that the casing of file names
will be important. There will be a canonical case for the file and it
must be saved somewhere.

It gets really messy for projects that try to me interoperable between
FS's, which Git for Windows needs to support. In some cases we have
upsteam files called 'Aux' and 'aux' which are both case-colliding, and
also forbidden file names on windows.


You do not say which Git for Windows version you are on. Plus you should
indicate how the project is structured, and how it got started such that
the file case changed (do you need to also work with folks on linux?).

If you are windows only, simply have a flag day where you definately
rename the files to the new case, and add in a bit of training to avoid
this and similar issues with branch names and other case sensitive areas.


Philip
> --
> You received this message because you are subscribed to the Google
> Groups "git-for-windows" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to git-for-windo...@googlegroups.com
> <mailto:git-for-windo...@googlegroups.com>.
> To post to this group, send email to git-for...@googlegroups.com
> <mailto:git-for...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/git-for-windows/de44ec71-8037-41f3-bb66-2632fe0d005b%40googlegroups.com
> <https://groups.google.com/d/msgid/git-for-windows/de44ec71-8037-41f3-bb66-2632fe0d005b%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

James Nord

unread,
Mar 8, 2019, 11:14:52 AM3/8/19
to git-for-windows
Hi all,

not a lot of people know so I am just mentioning incase it was not known here that the default File system on modern windows (NTFS) is case sensitive (and has always been).

Windows 10 1803 and later allows you to set case-sensitivity on a per folder basis (older versions of windows required you to do it across the board which obviosly breaks badly written apps so was not really a good idea to do)

   fsutil.exe file SetCaseSensitiveInfo drive:\path\to\folder enable

likely there is also an API (I have not looked) - but a case collision caused an issue earlier - hence https://github.com/git-for-windows/git/issues/2113

/James

E.S.A Security Group Shield

unread,
Mar 11, 2019, 2:30:12 PM3/11/19
to James Nord, git-for-windows
Hi.

That is ABSOLUTELY CORRECT and it’s only my fullest responsibilities to check out this! I’m sorry for that I missed out to do this! 

And I’ll won’t miss this again! ⚖️

Sincerely - Ambjoern Skoeld 
--
You received this message because you are subscribed to the Google Groups "git-for-windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to git-for-windo...@googlegroups.com.
To post to this group, send email to git-for...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/git-for-windows/9d477fa2-f4a7-4a64-b6d9-7c138d9a91f9%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages