Reputation: 4118
I have a given extension
directory containing plenty of other directories.
Among those plenty, one particular named important
that I want to be staged by git. The others I don't. So I created a .gitignore
file within my extension
directory with the following content:
*
!README
!.gitignore
!important/**
My goal was saying to Git:
important
directoryBut this is not working, only README
and .gitignore
are kept.
The syntax seems the right one to me so... I do not know where I am wrong.
Any suggestion is most welcomed.
Upvotes: 2
Views: 650
Reputation: 1510
You don't need the **
to recursively got through a directory.
*
!README
!.gitignore
!important/
Take a look at this answer Make .gitignore ignore everything except a few files
Upvotes: 2