git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Windows 7 - long/short and upper/lower filename

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 7, 2015, 14:03 UTC
Message-ID
<466225b8050e58deaf5ffa4ad41d64b9@www.dscho.org>
In-Reply-To
<55BFDAB0.8010306@gmail.com>
Hi,
On 2015-08-03 23:18, JoséQuintas wrote:
> I am using Windows 7 64 bits.
... and Git version... ?
Show 5 quoted lines
> I have a filename called ze_xmlfun.prg
> Last week gitgui shows 2 changed files: ZE_XML~1.PRG and ze_xmlfun.prg
> At momment I can't update this file, because get a error.
> Try delete file, update one name each time, but same error.
> Seems that a unique file is considered as 2 files, and this causes error.
This is no longer allowed in the most recent Git for Windows 1.x versions, for exactly the reason you mentioned: the short name is actually referring to the same file as the long name. Therefore, short names will be refused.
Unfortunately, you will have to fix this issue in your repository yourself. It will most likely entail something like `git rm --cached ZE_XML~1.PRG && git commit -s -m "Remove bogus file"`
> When do a search in history, upper/lower case must be the same as in git
> control.
> If upper/lower is changed, is considered a new file.
> How to configure git to work allways using lower case on Windows?
There is no such configuration. If you have a file with an undesired file name, you have to rename it. You can use `git mv` for that.
If the file name differs only in case, you will have to do a little dance like `git mv MYFILE myfile.bak && git mv myfile.bak myfile`
> Is there a plugin or a tool to make this, to new files and to update in
> git repository?
No, not unless you write one.
> Note: gitgui is a gui tool for git, ok, but once it uses git, may be
> this feature/change need to be made in git.
If you have an idea how to incorporate this into Git's source code, it would be a splendid idea to contribute that change to this mailing list.

Ciao, Johannes

Previous: JoséQuintas
Message 2 of 2 in “Windows 7 - long/short and upper/lower filename”
  1. JoséQuintasAug 3, 2015
  2. Johannes SchindelinAug 7, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.