【Git】git add -Aとgit add .とgit add -uの違い
Command New Files Modified Files Deleted Files Scope git add -A ⚪︎ ⚪︎ ⚪︎ 全てのディレクトリ git add . ⚪︎ ⚪︎ ⚪︎ カレントディレクトリ git add -u × ⚪︎ ⚪︎ 全てのディレクトリ git add -A 変更された全てのファイル(新規作成・更新・削除されたファイル)がaddされる git add -A dir1→dir1以下の変更された全てのファイルがaddされる git add . カレントディレクトリ以下の、変更された全てのファイルがaddされる git add dir1→dir1以下の変更された全てのファイルが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 dir1→dir1以下の変更・削除された追跡対象ファイルがaddされる git commit -a = git add -u + git commit 【参考】 Git - git-add Documentation git add - Difference between “git add -A” and “git add .” - Stack Overflow git add - What’s the difference between “git add -u” and “git add -A”? - Stack Overflow git add -u と git add -A と git add . の違い | note.nkmk.me Git - git-commit Documentation