git add .
adds all modified and new (untracked) files in the current directory and all subdirectories to the staging area (a.k.a. the index), thus preparing them to be included in the next git commit
.
Any files matching the patterns in the .gitignore
file will be ignored by git add
.
If you want to skip the git add .
step you can just add the -a
flag to git commit
(though that will include all modified files, not just in the current and subdirectories).
Note that git add .
will not do anything about deleted files. To include deletions in the index (and the comming commit) you need to do git add -A