I am trying to configure the .gitignore
file within my repository to track only certain files in a directory. So far what I have is this, but it does not work as I wish:
node_modules/*
node_modules/@themingisprose/icon-pack/*
!node_modules/@themingisprose/icon-pack/variables.scss
!node_modules/@themingisprose/icon-pack/style.scss
!node_modules/@themingisprose/icon-pack/svg/
!node_modules/@themingisprose/icon-pack/fonts/
!/node_modules/bootstrap/
In this case, I just want to follow the modifications of the files whose patterns start with !
, but if for example, within the directory icon-pack/
I modify the README.md
git sees it as modified.
I have searched in different forums and the solutions are more or less what I have, but it does not work for me.
Thanks in advance.