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

git stash broken on MS Windows (automatically modify the files again)

From
Petr Bena <benapetr@gmail.com>
Date
Dec 3, 2014, 14:33 UTC
Message-ID
<CA+4EQ5d70JWiawt5zb9s6Vc3cDMApPmhdB2w+WLyfmWCcTQF4g@mail.gmail.com>

I have a mysterious problem with one of my git repositories that work fine when I check it out on linux, but not when I do that on windows.

On windows, pile of files immediately change themselves - eg when I do git diff I see a lot of changes. What is even more interesting, is that when I do git stash, nothing happens (it tell me it stashed back, but changes are still there, so i can keep stashing and stashing but it doesn't help), I still have lot of dirty changes to tracked files and I can't get rid of them in any way. It's pretty much like if files were containing something what can't be stored on NTFS and windows version of git would replace the content with something else.

Because it's private repository I unfortunately can't provide it's content, but these files are mostly SQL text files, the screenshot (so that colors are preserved), is here: http://snag.gy/93A8S.jpg

Is there any way to "fix" windows git so that it works? Did anyone experience this? It may be something related to windows line endings, but I am not really sure.

During installation of GIT I checked "keep line endings as they are in repository"

Thanks
Next: Petr Bena
Message 1 of 5 in “git stash broken on MS Windows (automatically modify the files again)”
  1. Petr BenaDec 3, 2014
  2. Petr BenaDec 3, 2014
  3. Petr BenaDec 3, 2014
  4. Aneurin PriceDec 3, 2014
  5. Petr BenaDec 3, 2014

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.