Little Git Tricks: Ignore Everything in a Folder Except a Few Files
With the .gitignore file we can tell Git to ignore certain types of files (like *.exe) or whole folders. All it takes is an entry like this if we want to ignore the folder database:
1 |
/database |
As explained in another post, we can ignore the .gitignore by putting a ! in front of the entry. …