I had the same problem (components/dashboard/js-dev/training/index.js
wasn't being tracked for some reason), so I did the following:
$ git check-ignore -v components/dashboard/js-dev/training/index.js
$ (gave me nothing)
$ git check-ignore -v components/dashboard/js-dev/training/
$ /Users/User/.config/git/ignore:23: components/dashboard/js-dev/training/
Anyways, I found this to be quite weird, so then I took a look at this file, /Users/User/.config/git/ignore
, and this is what it looked like:
(this is line 1)
# Automatically created by GitHub for Mac
# To make edits, delete these initial comments, or else your changes may be lost!
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
And it turns out that line 23 is in fact the one between .com.apple.timemachine.donotpresent
and # Directories potentially created on remote AFP share
, in other words, it was a completely empty line!
I tried removing all the extra newlines so my file looked like this:
# Automatically created by GitHub for Mac
# To make edits, delete these initial comments, or else your changes may be lost!
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
I run git status
, and I notice that it's now picking up components/dashboard/js-dev/training/
. I run git add components/dashboard/js-dev/training/
, and all works fine again.
Hope this helps someone - this issue got me stuck for an unnecessarily long amount of time.