{"thread":{"id":"49137","subject":"\"Changes not staged for commit\" after cloning a repo on macOS","startedAt":"2018-08-15T20:50:27Z","lastAt":"2018-08-16T07:28:45Z","messageCount":5,"participants":["Hadi Safari","Bryan Turner","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"355760","messageId":"6022fbe8-0e07-f561-5e66-eeb4bc92704d@hadisafari.ir","threadId":"49137","inReplyTo":null,"subject":"\"Changes not staged for commit\" after cloning a repo on macOS","fromName":"Hadi Safari","fromEmail":"hadi@hadisafari.ir","sentAt":"2018-08-15T19:55:24Z","receivedAt":"2018-08-15T20:50:27Z","isPatch":false,"sender":{"key":"hadi@hadisafari.ir","avatar":null},"body":"Hi everyone!\n\nI encountered a strange situation on OS X recently. I cloned a \nrepository (https://github.com/kevinxucs/Sublime-Gitignore.git), went to \nfolder, and saw \"Changes not staged for commit\" message for four \nspecific files. It happened every time I repeated the procedure. I even \nwas able to commit those to the repo.\nAt first I thought there's something wrong with repo, but I cloned it on \nUbuntu 16.04 and everything was OK; no \"Changes not staged for commit\" \nmessage.\n\nDoes anyone have any idea?\n\nThank you.\n\nLog:\n\n```\n$ git clone https://github.com/kevinxucs/Sublime-Gitignore.git\nCloning into 'Sublime-Gitignore'...\nremote: Counting objects: 515, done.\nremote: Total 515 (delta 0), reused 0 (delta 0), pack-reused 515\nReceiving objects: 100% (515/515), 102.14 KiB | 48.00 KiB/s, done.\nResolving deltas: 100% (143/143), done.\n$ cd Sublime-Gitignore/\n$ git status\nOn branch master\nYour branch is up to date with 'origin/master'.\n\nChanges not staged for commit:\n   (use \"git add <file>...\" to update what will be committed)\n   (use \"git checkout -- <file>...\" to discard changes in working directory)\n\n     modified:   boilerplates/Nanoc.gitignore\n     modified:   boilerplates/OpenCart.gitignore\n     modified:   boilerplates/SASS.gitignore\n     modified:   boilerplates/WordPress.gitignore\n\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\n```\n\nThe rest of the log is available at \nhttps://github.com/kevinxucs/Sublime-Gitignore/issues/6. (I don't want \nthis email to become too long.)\n\n-- \nHadi Safari\nhttp://hadisafari.ir/\n"},{"id":"355764","messageId":"CAGyf7-EKCznDksZ6jovmtoA94Tj2V95zkMkS3PJrYfEYsO9U3w@mail.gmail.com","threadId":"49137","inReplyTo":"6022fbe8-0e07-f561-5e66-eeb4bc92704d@hadisafari.ir","subject":"Re: \"Changes not staged for commit\" after cloning a repo on macOS","fromName":"Bryan Turner","fromEmail":"bturner@atlassian.com","sentAt":"2018-08-15T21:06:51Z","receivedAt":"2018-08-15T21:07:04Z","isPatch":false,"sender":{"key":"bturner@atlassian.com","avatar":"https://gravatar.com/avatar/16bcf3167981c1ef7c804e502642366d888a35b0d0b0a4ca01fdc442aa1acb1e?d=mp&s=160"},"body":"On Wed, Aug 15, 2018 at 1:50 PM Hadi Safari <hadi@hadisafari.ir> wrote:\n>\n> Hi everyone!\n>\n> I encountered a strange situation on OS X recently. I cloned a\n> repository (https://github.com/kevinxucs/Sublime-Gitignore.git), went to\n> folder, and saw \"Changes not staged for commit\" message for four\n> specific files. It happened every time I repeated the procedure. I even\n> was able to commit those to the repo.\n> At first I thought there's something wrong with repo, but I cloned it on\n> Ubuntu 16.04 and everything was OK; no \"Changes not staged for commit\"\n> message.\n>\n> Does anyone have any idea?\n>\n>      modified:   boilerplates/Nanoc.gitignore\n>      modified:   boilerplates/OpenCart.gitignore\n>      modified:   boilerplates/SASS.gitignore\n>      modified:   boilerplates/WordPress.gitignore\n\nTaking a look at the repository's file list on GitHub[1], it shows\nthat this is because HFS and APFS by default are case-insensitive.\n\nThe file listing shows that there is a \"nanoc.gitignore\" and\n\"Nanoc.gitignore\". On APFS and HFS, those are the same file. As a\nresult, one overwrites the other. This is discussed pretty regularly\non the list[2], so you can find more details there.\n\n[1]: https://github.com/kevinxucs/Sublime-Gitignore/tree/master/boilerplates\n[2]: https://public-inbox.org/git/24A09B73-B4D4-4C22-BC1B-41B22CB59FE6@gmail.com/\nis a fairly recent (fairly long) thread about this behavior.\n\nHope this helps!\nBryan\n"},{"id":"355800","messageId":"3e0d7bd4-003e-60ea-ce1a-323ac49b4f71@hadisafari.ir","threadId":"49137","inReplyTo":"CAGyf7-EKCznDksZ6jovmtoA94Tj2V95zkMkS3PJrYfEYsO9U3w@mail.gmail.com","subject":"Re: \"Changes not staged for commit\" after cloning a repo on macOS","fromName":"Hadi Safari","fromEmail":"hadi@hadisafari.ir","sentAt":"2018-08-16T03:04:37Z","receivedAt":"2018-08-16T03:04:46Z","isPatch":false,"sender":{"key":"hadi@hadisafari.ir","avatar":null},"body":"I checked line-ending but didn't think to file names.\n\nThank you so much.\n\nOn 25/5/1397 AP 1:36 AM, Bryan Turner wrote:\n> Taking a look at the repository's file list on GitHub[1], it shows\n> that this is because HFS and APFS by default are case-insensitive.\n> \n> The file listing shows that there is a \"nanoc.gitignore\" and\n> \"Nanoc.gitignore\". On APFS and HFS, those are the same file. As a\n> result, one overwrites the other. This is discussed pretty regularly\n> on the list[2], so you can find more details there.\n> \n> [1]: https://github.com/kevinxucs/Sublime-Gitignore/tree/master/boilerplates\n> [2]: https://public-inbox.org/git/24A09B73-B4D4-4C22-BC1B-41B22CB59FE6@gmail.com/\n> is a fairly recent (fairly long) thread about this behavior.\n> \n\n-- \nHadi Safari\n"},{"id":"355813","messageId":"20180816062317.GA5080@tor.lan","threadId":"49137","inReplyTo":"6022fbe8-0e07-f561-5e66-eeb4bc92704d@hadisafari.ir","subject":"Re: \"Changes not staged for commit\" after cloning a repo on macOS","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2018-08-16T06:23:17Z","receivedAt":"2018-08-16T06:24:04Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Thu, Aug 16, 2018 at 12:25:24AM +0430, Hadi Safari wrote:\n> Hi everyone!\n> \n> I encountered a strange situation on OS X recently. I cloned a repository\n> (https://github.com/kevinxucs/Sublime-Gitignore.git), went to folder, and\n> saw \"Changes not staged for commit\" message for four specific files. It\n> happened every time I repeated the procedure. I even was able to commit\n> those to the repo.\n> At first I thought there's something wrong with repo, but I cloned it on\n> Ubuntu 16.04 and everything was OK; no \"Changes not staged for commit\"\n> message.\n> \n> Does anyone have any idea?\n> \n> Thank you.\n> \n> Log:\n> \n> ```\n> $ git clone https://github.com/kevinxucs/Sublime-Gitignore.git\n> Cloning into 'Sublime-Gitignore'...\n> remote: Counting objects: 515, done.\n> remote: Total 515 (delta 0), reused 0 (delta 0), pack-reused 515\n> Receiving objects: 100% (515/515), 102.14 KiB | 48.00 KiB/s, done.\n> Resolving deltas: 100% (143/143), done.\n> $ cd Sublime-Gitignore/\n> $ git status\n> On branch master\n> Your branch is up to date with 'origin/master'.\n> \n> Changes not staged for commit:\n>   (use \"git add <file>...\" to update what will be committed)\n>   (use \"git checkout -- <file>...\" to discard changes in working directory)\n> \n>     modified:   boilerplates/Nanoc.gitignore\n>     modified:   boilerplates/OpenCart.gitignore\n>     modified:   boilerplates/SASS.gitignore\n>     modified:   boilerplates/WordPress.gitignore\n> \n> no changes added to commit (use \"git add\" and/or \"git commit -a\")\n> ```\n> \n> The rest of the log is available at\n> https://github.com/kevinxucs/Sublime-Gitignore/issues/6. (I don't want this\n> email to become too long.)\n> \n> -- \n> Hadi Safari\n> http://hadisafari.ir/\n\n\nThis repo seams not ment to be cloned onto a file system, which is case-insensitive.\nFor example, (see below), this 2 files a different in the repo, but the file system\ncan not have 'WordPress' and 'Wordpres's as different files or directories at the same\ntime.\nThis affects typically Mac OS and Windows users.\n\nThere is actually some work going on right now to inform the user about this problem.\n(Thanks Duy !)\nIf I clone it with a patched Git, I get the following:\n\n\ngit clone https://github.com/kevinxucs/Sublime-Gitignore.git\nCloning into 'Sublime-Gitignore'...\nremote: Counting objects: 515, done.\nremote: Total 515 (delta 0), reused 0 (delta 0), pack-reused 515\nReceiving objects: 100% (515/515), 102.16 KiB | 35.00 KiB/s, done.\nResolving deltas: 100% (143/143), done.\nwarning: the following paths have collided (e.g. case-sensitive paths\non a case-insensitive filesystem) and only one from the same\ncolliding group is in the working tree:\n\n  'boilerplates/Gcov.gitignore'\n  'boilerplates/Nanoc.gitignore'\n  'boilerplates/OpenCart.gitignore'\n  'boilerplates/SASS.gitignore'\n  'boilerplates/Sass.gitignore'\n  'boilerplates/Stella.gitignore'\n  'boilerplates/WordPress.gitignore'\n  'boilerplates/Wordpress.gitignore'\n  'boilerplates/gcov.gitignore'\n  'boilerplates/nanoc.gitignore'\n  'boilerplates/opencart.gitignore'\n  'boilerplates/stella.gitignore'\n\nWould this text help you ?\n\nI am asking because the development is still ongoing, so things can be improved.\n"},{"id":"355816","messageId":"d132cb0e-97f2-708c-83b2-124ee4569e17@hadisafari.ir","threadId":"49137","inReplyTo":"20180816062317.GA5080@tor.lan","subject":"Re: \"Changes not staged for commit\" after cloning a repo on macOS","fromName":"Hadi Safari","fromEmail":"hadi@hadisafari.ir","sentAt":"2018-08-16T07:28:33Z","receivedAt":"2018-08-16T07:28:45Z","isPatch":false,"sender":{"key":"hadi@hadisafari.ir","avatar":null},"body":"On 25/5/1397 AP 10:53 AM, Torsten Bögershausen wrote:\n> This repo seams not ment to be cloned onto a file system, which is case-insensitive.\n> For example, (see below), this 2 files a different in the repo, but the file system\n> can not have 'WordPress' and 'Wordpres's as different files or directories at the same\n> time.\n> This affects typically Mac OS and Windows users.\n> \n> There is actually some work going on right now to inform the user about this problem.\n> (Thanks Duy !)\n> If I clone it with a patched Git, I get the following:\n> \n> \n> git clone https://github.com/kevinxucs/Sublime-Gitignore.git\n> Cloning into 'Sublime-Gitignore'...\n> remote: Counting objects: 515, done.\n> remote: Total 515 (delta 0), reused 0 (delta 0), pack-reused 515\n> Receiving objects: 100% (515/515), 102.16 KiB | 35.00 KiB/s, done.\n> Resolving deltas: 100% (143/143), done.\n> warning: the following paths have collided (e.g. case-sensitive paths\n> on a case-insensitive filesystem) and only one from the same\n> colliding group is in the working tree:\n> \n>    'boilerplates/Gcov.gitignore'\n>    'boilerplates/Nanoc.gitignore'\n>    'boilerplates/OpenCart.gitignore'\n>    'boilerplates/SASS.gitignore'\n>    'boilerplates/Sass.gitignore'\n>    'boilerplates/Stella.gitignore'\n>    'boilerplates/WordPress.gitignore'\n>    'boilerplates/Wordpress.gitignore'\n>    'boilerplates/gcov.gitignore'\n>    'boilerplates/nanoc.gitignore'\n>    'boilerplates/opencart.gitignore'\n>    'boilerplates/stella.gitignore'\n> \n> Would this text help you ?\n> \n> I am asking because the development is still ongoing, so things can be improved.\n> \n\nYes, thank you. It's clear and helpful. I got what is happening.\n\n-- \nHadi Safari\nhttp://hadisafari.ir/\n"}]}