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

Re: "Changes not staged for commit" after cloning a repo on macOS

From
Bryan Turner <bturner@atlassian.com>
Date
Aug 15, 2018, 21:06 UTC
Message-ID
<CAGyf7-EKCznDksZ6jovmtoA94Tj2V95zkMkS3PJrYfEYsO9U3w@mail.gmail.com>
In-Reply-To
<6022fbe8-0e07-f561-5e66-eeb4bc92704d@hadisafari.ir>
On Wed, Aug 15, 2018 at 1:50 PM Hadi Safari <hadi@hadisafari.ir> wrote:
Show 18 quoted lines
>
> Hi everyone!
>
> I encountered a strange situation on OS X recently. I cloned a
> repository (https://github.com/kevinxucs/Sublime-Gitignore.git), went to
> folder, and saw "Changes not staged for commit" message for four
> specific files. It happened every time I repeated the procedure. I even
> was able to commit those to the repo.
> At first I thought there's something wrong with repo, but I cloned it on
> Ubuntu 16.04 and everything was OK; no "Changes not staged for commit"
> message.
>
> Does anyone have any idea?
>
>      modified:   boilerplates/Nanoc.gitignore
>      modified:   boilerplates/OpenCart.gitignore
>      modified:   boilerplates/SASS.gitignore
>      modified:   boilerplates/WordPress.gitignore

Taking a look at the repository's file list on GitHub[1], it shows that this is because HFS and APFS by default are case-insensitive.

The file listing shows that there is a "nanoc.gitignore" and "Nanoc.gitignore". On APFS and HFS, those are the same file. As a result, one overwrites the other. This is discussed pretty regularly on the list[2], so you can find more details there.

[1]: https://github.com/kevinxucs/Sublime-Gitignore/tree/master/boilerplates [2]: https://public-inbox.org/git/24A09B73-B4D4-4C22-BC1B-41B22CB59FE6@gmail.com/ is a fairly recent (fairly long) thread about this behavior.

Hope this helps! Bryan

Previous: Hadi SafariNext: Hadi Safari
Message 2 of 5 in “"Changes not staged for commit" after cloning a repo on macOS”
  1. Hadi SafariAug 15, 2018
  2. Bryan TurnerAug 15, 2018
  3. Hadi SafariAug 16, 2018
  4. Torsten BögershausenAug 16, 2018
  5. Hadi SafariAug 16, 2018

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.