Git empty directories FAQ - How to add an empty directory to Git

Git empty directories FAQ: How do I add an empty directory to a Git repository?

Short answer - you can't. (See below for the workaround.) The design of the Git staging area only accounts for files, as described in the Git FAQ, and other books like Pro Git.

Git empty directories FAQ

Here's the text from the Git FAQ section, "Can I add empty directories to a Git repository":

Private Git repository hosting services

Private Git hosting services FAQ: What companies offer Git hosting, in particular private Git hosting services?

How to install Git on Mac OS X

Mac Git installation FAQ: How do I install Git on Mac OS X?

There are at least two different ways to install Git on Mac OS X systems, and I've used both of these methods. The first approach is to use a Mac GUI installer, and the second is to use the command-line MacPorts project to install Git on Mac OS X.

How do I Git help?

Git help FAQ: How do I Git help?

Sorry for that title, but I used to live in several southern states in the United States, and people there often pronounce "get" like "git". (I hope they'll take this joke well, lol.)

The Git help command

If you need to see the Git help text, you can start by using the "git help" command, like this:

git help

This command displays the following output:

How to show or change your Git username or email address

Git user FAQ: How do I show or change my Git username (or email address)?

How to show your Git username

There are several ways to show your Git username. One way is with the "git config" command, like this:

git config

which in my case returns:

Alvin Alexander

Another way to show your Git username is with this git config command:

git config --list

which returns this output: