Track Empty Directories with git
There are times when you'd like to track an empty directory within git but there's a problem: git wont allow you to add a directory that doesn't have a file in it.  The easy solution is putting an empty stub file within the directory, and the industry standard for that stub file name is .gitkeep.
You can quickly create the file and commit the "empty" directory from command line:
touch my-empty-dir/.gitkeep
git add my-empty-dir/.gitkeep
git commit -m "Adding my empty directory"
The problem is simple, the solution is easy, but I wanted to highlight that .gitkeep is the industry standard.
![Animating CSS3 Transforms with MooTools Fx]()
![Camera and Video Control with HTML5]()
Client-side APIs on mobile and desktop devices are quickly providing the same APIs.  Of course our mobile devices got access to some of these APIs first, but those APIs are slowly making their way to the desktop.  One of those APIs is the getUserMedia API...
![RealTime Stock Quotes with MooTools Request.Stocks and YQL]()
It goes without saying but MooTools' inheritance pattern allows for creation of small, simple classes that possess immense power.  One example of that power is a class that inherits from Request, Request.JSON, and Request.JSONP:  Request.Stocks.  Created by Enrique Erne, this great MooTools class acts as...
![Sexy Album Art with MooTools or jQuery]()
The way that album information displays is usually insanely boring.  Music is supposed to be fun and moving, right?  Luckily MooTools and jQuery allow us to communicate that  creativity on the web.
The XHTML
A few structure DIVs and the album information.
The CSS
The CSS...
If you want to keep empty directory in git and be sure that its eventually content won’t be pushed, you have to add line in
.gitignore. Going to the point,.gitkeepis one of the methods and the more common (from my experience) is to create.gitignorewithI’d be interested where the “
.gitkeepis the industry standard” came from. Last time I was looking at a couple of repositories, the preference was an empty.gitignorefile.Good tips, Mathew and David!
@Mathew: When I use this tip, I usually include
*/as well to exclude subfolders. This can be pretty handy for thoselog/,cache, andsessionstypes of directories.