{"thread":{"id":"38100","subject":"git stash broken on MS Windows (automatically modify the files again)","startedAt":"2014-12-03T14:33:26Z","lastAt":"2014-12-03T17:03:44Z","messageCount":5,"participants":["Petr Bena","Aneurin Price"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"252945","messageId":"CA+4EQ5d70JWiawt5zb9s6Vc3cDMApPmhdB2w+WLyfmWCcTQF4g@mail.gmail.com","threadId":"38100","inReplyTo":null,"subject":"git stash broken on MS Windows (automatically modify the files again)","fromName":"Petr Bena","fromEmail":"benapetr@gmail.com","sentAt":"2014-12-03T14:33:26Z","receivedAt":"2014-12-03T14:33:26Z","isPatch":false,"sender":{"key":"benapetr@gmail.com","avatar":"https://gravatar.com/avatar/d8e2bbb0fa34077a33e1bb62ab14aa844ddce3bc3c8759f059f020ebde43d6d7?d=mp&s=160"},"body":"I have a mysterious problem with one of my git repositories that work\nfine when I check it out on linux, but not when I do that on windows.\n\nOn windows, pile of files immediately change themselves - eg when I do\ngit diff I see a lot of changes. What is even more interesting, is\nthat when I do git stash, nothing happens (it tell me it stashed back,\nbut changes are still there, so i can keep stashing and stashing but\nit doesn't help), I still have lot of dirty changes to tracked files\nand I can't get rid of them in any way. It's pretty much like if files\nwere containing something what can't be stored on NTFS and windows\nversion of git would replace the content with something else.\n\nBecause it's private repository I unfortunately can't provide it's\ncontent, but these files are mostly SQL text files, the screenshot (so\nthat colors are preserved), is here: http://snag.gy/93A8S.jpg\n\nIs there any way to \"fix\" windows git so that it works? Did anyone\nexperience this? It may be something related to windows line endings,\nbut I am not really sure.\n\nDuring installation of GIT I checked \"keep line endings as they are in\nrepository\"\n\nThanks\n"},{"id":"252946","messageId":"CA+4EQ5cfC2N+e6g7wnxDZnnPj3BKTyuMj=TxX90fB7o+_EiOBQ@mail.gmail.com","threadId":"38100","inReplyTo":"CA+4EQ5d70JWiawt5zb9s6Vc3cDMApPmhdB2w+WLyfmWCcTQF4g@mail.gmail.com","subject":"Re: git stash broken on MS Windows (automatically modify the files again)","fromName":"Petr Bena","fromEmail":"benapetr@gmail.com","sentAt":"2014-12-03T14:46:56Z","receivedAt":"2014-12-03T14:46:56Z","isPatch":false,"sender":{"key":"benapetr@gmail.com","avatar":"https://gravatar.com/avatar/d8e2bbb0fa34077a33e1bb62ab14aa844ddce3bc3c8759f059f020ebde43d6d7?d=mp&s=160"},"body":"I actually can't even commit these changes:\n\npetr.bena@MW7H3TP5JJBR0I ~/Documents/repo (export)\n$ git stash\nSaved working directory and index state WIP on export: ee21f45 Updated inserts\nHEAD is now at ee21f45 Updated inserts\n\npetr.bena@MW7H3TP5JJBR0I ~/Documents/repo (export)\n$ git checkout master\nerror: Your local changes to the following files would be overwritten by checkou\nt:\n        BSS/export_home_oracle/scripts_IDAEU001/RENEWAL_BED_NEW/script_sql/creat\ne_new_bed.sql\n        BSS/export_home_oracle/scripts_IDAEU001/appo/RENEWAL_BED/script_sql/crea\nte_new_bed.sql\n        BSS/export_home_oracle/scripts_IDAEU001/audit/audit_off.sql\n        BSS/export_home_oracle/scripts_IDAEU001/audit/audit_on.sql\n        BSS/export_home_oracle/scripts_IDAEU001/create_ts_transito.sql\n        BSS/export_home_oracle/scripts_IDAEU006/RENEWAL_BED/script_sql/create_ne\nw_bed.sql\n        BSS/export_home_oracle/scripts_IDAEU006/bed/script_sql/create_new_bed.sq\nl\nPlease, commit your changes or stash them before you can switch branches.\nAborting\n\npetr.bena@MW7H3TP5JJBR0I ~/Documents/repo (export)\n$ git commit -a\nfatal: Will not add file alias 'BSS/export_home_oracle/scripts_IDAEU001/Audit/au\ndit_off.sql' ('BSS/export_home_oracle/scripts_IDAEU001/audit/audit_off.sql' alre\nady exists in index)\n\nOn Wed, Dec 3, 2014 at 3:33 PM, Petr Bena <benapetr@gmail.com> wrote:\n> I have a mysterious problem with one of my git repositories that work\n> fine when I check it out on linux, but not when I do that on windows.\n>\n> On windows, pile of files immediately change themselves - eg when I do\n> git diff I see a lot of changes. What is even more interesting, is\n> that when I do git stash, nothing happens (it tell me it stashed back,\n> but changes are still there, so i can keep stashing and stashing but\n> it doesn't help), I still have lot of dirty changes to tracked files\n> and I can't get rid of them in any way. It's pretty much like if files\n> were containing something what can't be stored on NTFS and windows\n> version of git would replace the content with something else.\n>\n> Because it's private repository I unfortunately can't provide it's\n> content, but these files are mostly SQL text files, the screenshot (so\n> that colors are preserved), is here: http://snag.gy/93A8S.jpg\n>\n> Is there any way to \"fix\" windows git so that it works? Did anyone\n> experience this? It may be something related to windows line endings,\n> but I am not really sure.\n>\n> During installation of GIT I checked \"keep line endings as they are in\n> repository\"\n>\n> Thanks\n"},{"id":"252947","messageId":"CA+4EQ5fbDPFuzuz_OAX1Y=zCdL76j3ah0u0BVUW2pPqjaf4kBQ@mail.gmail.com","threadId":"38100","inReplyTo":"CA+4EQ5cfC2N+e6g7wnxDZnnPj3BKTyuMj=TxX90fB7o+_EiOBQ@mail.gmail.com","subject":"Re: git stash broken on MS Windows (automatically modify the files again)","fromName":"Petr Bena","fromEmail":"benapetr@gmail.com","sentAt":"2014-12-03T14:48:20Z","receivedAt":"2014-12-03T14:48:20Z","isPatch":false,"sender":{"key":"benapetr@gmail.com","avatar":"https://gravatar.com/avatar/d8e2bbb0fa34077a33e1bb62ab14aa844ddce3bc3c8759f059f020ebde43d6d7?d=mp&s=160"},"body":"Only solution so far was to clone on linux, remove the folder which\ncontains these files and push them, then I had to delete the whole\nrepository on windows and clone it again.\n\nIf I checkout any revision which contains these files repository get\nbroken in a way that only solution is deleting it from disk and\ncloning again. Is this a bug?\n\nOn Wed, Dec 3, 2014 at 3:46 PM, Petr Bena <benapetr@gmail.com> wrote:\n> I actually can't even commit these changes:\n>\n> petr.bena@MW7H3TP5JJBR0I ~/Documents/repo (export)\n> $ git stash\n> Saved working directory and index state WIP on export: ee21f45 Updated inserts\n> HEAD is now at ee21f45 Updated inserts\n>\n> petr.bena@MW7H3TP5JJBR0I ~/Documents/repo (export)\n> $ git checkout master\n> error: Your local changes to the following files would be overwritten by checkou\n> t:\n>         BSS/export_home_oracle/scripts_IDAEU001/RENEWAL_BED_NEW/script_sql/creat\n> e_new_bed.sql\n>         BSS/export_home_oracle/scripts_IDAEU001/appo/RENEWAL_BED/script_sql/crea\n> te_new_bed.sql\n>         BSS/export_home_oracle/scripts_IDAEU001/audit/audit_off.sql\n>         BSS/export_home_oracle/scripts_IDAEU001/audit/audit_on.sql\n>         BSS/export_home_oracle/scripts_IDAEU001/create_ts_transito.sql\n>         BSS/export_home_oracle/scripts_IDAEU006/RENEWAL_BED/script_sql/create_ne\n> w_bed.sql\n>         BSS/export_home_oracle/scripts_IDAEU006/bed/script_sql/create_new_bed.sq\n> l\n> Please, commit your changes or stash them before you can switch branches.\n> Aborting\n>\n> petr.bena@MW7H3TP5JJBR0I ~/Documents/repo (export)\n> $ git commit -a\n> fatal: Will not add file alias 'BSS/export_home_oracle/scripts_IDAEU001/Audit/au\n> dit_off.sql' ('BSS/export_home_oracle/scripts_IDAEU001/audit/audit_off.sql' alre\n> ady exists in index)\n>\n> On Wed, Dec 3, 2014 at 3:33 PM, Petr Bena <benapetr@gmail.com> wrote:\n>> I have a mysterious problem with one of my git repositories that work\n>> fine when I check it out on linux, but not when I do that on windows.\n>>\n>> On windows, pile of files immediately change themselves - eg when I do\n>> git diff I see a lot of changes. What is even more interesting, is\n>> that when I do git stash, nothing happens (it tell me it stashed back,\n>> but changes are still there, so i can keep stashing and stashing but\n>> it doesn't help), I still have lot of dirty changes to tracked files\n>> and I can't get rid of them in any way. It's pretty much like if files\n>> were containing something what can't be stored on NTFS and windows\n>> version of git would replace the content with something else.\n>>\n>> Because it's private repository I unfortunately can't provide it's\n>> content, but these files are mostly SQL text files, the screenshot (so\n>> that colors are preserved), is here: http://snag.gy/93A8S.jpg\n>>\n>> Is there any way to \"fix\" windows git so that it works? Did anyone\n>> experience this? It may be something related to windows line endings,\n>> but I am not really sure.\n>>\n>> During installation of GIT I checked \"keep line endings as they are in\n>> repository\"\n>>\n>> Thanks\n"},{"id":"252955","messageId":"CAHb+SPAw+aeR4RsB6COhq4RMxuXJ64scY-Ez5tZPk3ziEAGm=Q@mail.gmail.com","threadId":"38100","inReplyTo":"CA+4EQ5fbDPFuzuz_OAX1Y=zCdL76j3ah0u0BVUW2pPqjaf4kBQ@mail.gmail.com","subject":"Re: git stash broken on MS Windows (automatically modify the files again)","fromName":"Aneurin Price","fromEmail":"aneurin.price@gmail.com","sentAt":"2014-12-03T16:50:14Z","receivedAt":"2014-12-03T16:50:14Z","isPatch":false,"sender":{"key":"aneurin.price@gmail.com","avatar":null},"body":"On 3 December 2014 at 14:48, Petr Bena <benapetr@gmail.com> wrote:\n> Only solution so far was to clone on linux, remove the folder which\n> contains these files and push them, then I had to delete the whole\n> repository on windows and clone it again.\n>\n> If I checkout any revision which contains these files repository get\n> broken in a way that only solution is deleting it from disk and\n> cloning again. Is this a bug?\n>\n\n<snip>\n\n>> fatal: Will not add file alias 'BSS/export_home_oracle/scripts_IDAEU001/Audit/au\n>> dit_off.sql' ('BSS/export_home_oracle/scripts_IDAEU001/audit/audit_off.sql' alre\n>> ady exists in index)\n>>\n\nOn your Linux machine (and in the repository), do you actually have\nboth 'BSS/export_home_oracle/scripts_IDAEU001/Audit' and\n'BSS/export_home_oracle/scripts_IDAEU001/audit' directories?\n"},{"id":"252957","messageId":"CA+4EQ5e6464+MP7TqWMT8ceO6ZgZEE6xJPxJBfpAhoj4B-03Uw@mail.gmail.com","threadId":"38100","inReplyTo":"CAHb+SPAw+aeR4RsB6COhq4RMxuXJ64scY-Ez5tZPk3ziEAGm=Q@mail.gmail.com","subject":"Re: git stash broken on MS Windows (automatically modify the files again)","fromName":"Petr Bena","fromEmail":"benapetr@gmail.com","sentAt":"2014-12-03T17:03:44Z","receivedAt":"2014-12-03T17:03:44Z","isPatch":false,"sender":{"key":"benapetr@gmail.com","avatar":"https://gravatar.com/avatar/d8e2bbb0fa34077a33e1bb62ab14aa844ddce3bc3c8759f059f020ebde43d6d7?d=mp&s=160"},"body":"Yay\n\nWhy doesn't windows git perform some kind of check here, and doesn't\ntell you a message like: this repository contains multiple files with\nsame name, which I can't checkout on this OS Or something like that?\n\nOn Wed, Dec 3, 2014 at 5:50 PM, Aneurin Price <aneurin.price@gmail.com> wrote:\n> On 3 December 2014 at 14:48, Petr Bena <benapetr@gmail.com> wrote:\n>> Only solution so far was to clone on linux, remove the folder which\n>> contains these files and push them, then I had to delete the whole\n>> repository on windows and clone it again.\n>>\n>> If I checkout any revision which contains these files repository get\n>> broken in a way that only solution is deleting it from disk and\n>> cloning again. Is this a bug?\n>>\n>\n> <snip>\n>\n>>> fatal: Will not add file alias 'BSS/export_home_oracle/scripts_IDAEU001/Audit/au\n>>> dit_off.sql' ('BSS/export_home_oracle/scripts_IDAEU001/audit/audit_off.sql' alre\n>>> ady exists in index)\n>>>\n>\n> On your Linux machine (and in the repository), do you actually have\n> both 'BSS/export_home_oracle/scripts_IDAEU001/Audit' and\n> 'BSS/export_home_oracle/scripts_IDAEU001/audit' directories?\n"}]}