Reputation: 2510
How can I ignore the files inside the folder but keeping the folder in mercurial?
I tried in this way but also folder is ignored.
syntax: glob
photos/*.jpg
photos/*.gif
photos/thumbs/*.jpg
photos/thumbs/*.gif
Thanks
Upvotes: 1
Views: 230
Reputation: 1407
Create an empty file named .keep
in the folder and add it to your repository.
touch photos/.keep
hg add photos/.keep
This way the folder will be still tracked, even if its contents and the folder itself are in .hgignore.
Upvotes: 3