It depends what you mean by adding a directory to a Git repository.
I get the feeling that you mean that you want to create a new project using an existing directory. In which case, you would need to go inside your directory and use git init. Here a quick guide I just found.
However, if you mean that you already have a Git project and wish to add a directory - the answer is simply to use git add path
Let us know if you need more information (such as setting up a remote, or using github.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…