.gitkeep's color in tree view


As you know, Atom displays file names in different color according to their Git status. This is very useful. I’ve encountered a strange behavior, though.

Let me take an example.

| └.gitkeep

If the .gitignore is


tree view would look like

and if the .gitignore is


tree view would look like

I like the former .gitignore and the latter tree view coloring. How can I make both of them come true at the same time and why these two .gitignores make different tree views?

I suppose the .gitignores should result in the same appearance because the command git ls-files returns the same answer in both cases, but feel free to tell me if I have some misunderstandings about Git.

$ git ls-files

Note that I use OS X Yosemite 10.10.5 and Atom 1.1.0.


This is a great bug write up :grinning: Would you mind filing it on the Tree View at https://github.com/atom/tree-view/issues? If you do, please post a link to the issue here on the topic so others who find this topic can subscribe easily.


Of course, I will when I had spare time a few hours later. I found that the same problem also occurs on tabs. Where should I make an issue, at atom/tree-view, atom/tabs or both?


It’s probably the same root cause, perhaps in the libgit2 library. I would just create the one in tree-view (since you already have the repro images there) and mention that it affects tabs also.


I tried to post an issue there, and noticed that a similar issue (possibly a duplicate) is already made. So I myself didn’t.

As the original opener says, tree view can handle .gitkeep in the project root properly. The command touch /path/to/test/.gitkeep shows

P.S. I added a link to this thread in the existing issue. If I should provide a specific description there, not just a link, don’t hesitate to tell me and I’ll edit the comment ASAP.


Bumping because the issue still exists. I’ve tracked down some more information and included it with the issue from above.