CommandNew FilesModified FilesDeleted FilesScope
git add -A⚪︎⚪︎⚪︎全てのディレクトリ
git add .⚪︎⚪︎⚪︎カレントディレクトリ
git add -u×⚪︎⚪︎全てのディレクトリ

git add -A

  • 変更された全てのファイル(新規作成・更新・削除されたファイル)がaddされる
  • git add -A dir1dir1以下の変更された全てのファイルがaddされる

git add .

  • カレントディレクトリ以下の、変更された全てのファイルがaddされる
  • git add dir1dir1以下の変更された全てのファイルがaddされる
  • Git Version 1.xまでは削除されたファイルはaddされなかったが、2.xから上記の仕様になった([https://github.com/git/git/blob/master/Documentation/RelNotes/2.0.0.txt:title])

git add -u

  • 更新・削除された追跡対象ファイルがaddされる(新規作成ファイルはaddされない)
  • git add -u dir1dir1以下の変更・削除された追跡対象ファイルがaddされる
  • git commit -a = git add -u + git commit

【参考】