If you are not familiar with Git, check out our getting started article. These examples are based on Linux.
Let's say the root directory of your master Git repository is /var/git. Move into the root directory.
Create a new file.
Add the new file to Git.
git add foo.txt
The git status command will now show that foo.txt is ready to be committed.
git status . . . Changes to be committed: . . . new file: foo.txt
You would then commit the new file.
Adding multiple files in a directory
Let's say the "test" directory contains two (or more) files.
Adding the test directory will add every file below the test directory.
git add test
Directories are not tracked in git. For example, let say you create a directory named fooBar.
And add the fooBar directory.
git add fooBar
The git status command will not contain "fooBar". This is because git tracks files, not directories.