Reputation: 6119
I want to ignore all the files present in current directory, but want to track all the directories and sub directories.
How can I do that?
Adding *
in .gitignore
simply ignores everything, including directories and sub-directories. How to ignore only files, but not directories.
Upvotes: 1
Views: 98
Reputation: 177510
# Ignore everything in this directory
/*
# Except for directories
!/*/
Upvotes: 1
Reputation: 129526
you should be able to add an exclude section below with */*
Upvotes: 0