How to force git to ignorirovat all the contents of a directory except one file?
Fundamentally a project is a file
.gitignore
, its contents are:
$ cat .gitignore
/nbproject
/rt-content/users
/rt-content/places
!/rt-content/users/index.html
!/rt-content/places/index.html
You need to ignore the contents of the directories
/rt-content/users
and
/rt-content/places
, but it does not ignore files
/rt-content/users/index.html
and
/rt-content/places/index.html
inside these directories. My version is not working, what am I doing wrong, how?