$ git --version
git version 2.6.4
I realize this is a duplicate but the other question\'s answers have not helped.
Folder structure
I has the similar problem with another .gitignore in subdirectory. For examaple:
- root
-- Subdir
--- gulpfile.js
--- .gitignore
-- .gitignore
In root .gitignore
where two rules:
*.js
!gulpfile.js
And in Subdir/gulpfile.js
where another one rule:
*.js
Because of that, Subdir/gulpfile.js
where ignored. To solve problem it is required to remove Subdir/.gitignore
, or add !gulpfile.js
to Subdir/.gitignore
.