Commit in Git
Nugget posted by Mark Fenoglio
October 4, 2009

In Git, each commit is a product of all the modifications and new files added to the working copy. Unlike with Subversion, where all modified files are assumed to be part of the commit, Git requires you to explicitly add them. Fortunately, there is a handy shortcut for adding everything.

markf$ cd ~/Sites/fw
markf$ git add .
markf$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD ..." to unstage)
#
#    modified:   controller/IWOrderedListController.php
#    modified:   html/IWRequest.php
#    modified:   html/IWURL.php
#    modified:   navigator/IWNavigator.php
#    modified:   test/Autoload.php
#    new file:   test/html/IWRequestTest.php
#

When you add modifications and new files in this fashion, Git also respects its own ignore list.