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

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

From
Petr Bena <benapetr@gmail.com>
Date
Dec 3, 2014, 14:48 UTC
Message-ID
<CA+4EQ5fbDPFuzuz_OAX1Y=zCdL76j3ah0u0BVUW2pPqjaf4kBQ@mail.gmail.com>
In-Reply-To
<CA+4EQ5cfC2N+e6g7wnxDZnnPj3BKTyuMj=TxX90fB7o+_EiOBQ@mail.gmail.com>

Only solution so far was to clone on linux, remove the folder which contains these files and push them, then I had to delete the whole repository on windows and clone it again.

If I checkout any revision which contains these files repository get broken in a way that only solution is deleting it from disk and cloning again. Is this a bug?

On Wed, Dec 3, 2014 at 3:46 PM, Petr Bena <benapetr@gmail.com> wrote:
Show 56 quoted lines
> I actually can't even commit these changes:
>
> petr.bena@MW7H3TP5JJBR0I ~/Documents/repo (export)
> $ git stash
> Saved working directory and index state WIP on export: ee21f45 Updated inserts
> HEAD is now at ee21f45 Updated inserts
>
> petr.bena@MW7H3TP5JJBR0I ~/Documents/repo (export)
> $ git checkout master
> error: Your local changes to the following files would be overwritten by checkou
> t:
>         BSS/export_home_oracle/scripts_IDAEU001/RENEWAL_BED_NEW/script_sql/creat
> e_new_bed.sql
>         BSS/export_home_oracle/scripts_IDAEU001/appo/RENEWAL_BED/script_sql/crea
> te_new_bed.sql
>         BSS/export_home_oracle/scripts_IDAEU001/audit/audit_off.sql
>         BSS/export_home_oracle/scripts_IDAEU001/audit/audit_on.sql
>         BSS/export_home_oracle/scripts_IDAEU001/create_ts_transito.sql
>         BSS/export_home_oracle/scripts_IDAEU006/RENEWAL_BED/script_sql/create_ne
> w_bed.sql
>         BSS/export_home_oracle/scripts_IDAEU006/bed/script_sql/create_new_bed.sq
> l
> Please, commit your changes or stash them before you can switch branches.
> Aborting
>
> petr.bena@MW7H3TP5JJBR0I ~/Documents/repo (export)
> $ git commit -a
> fatal: Will not add file alias 'BSS/export_home_oracle/scripts_IDAEU001/Audit/au
> dit_off.sql' ('BSS/export_home_oracle/scripts_IDAEU001/audit/audit_off.sql' alre
> ady exists in index)
>
> On Wed, Dec 3, 2014 at 3:33 PM, Petr Bena <benapetr@gmail.com> wrote:
>> 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
Previous: Petr BenaNext: Aneurin Price
Message 3 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.