Git add all files modified, deleted, and untracked?

INSANENEIVIESIS picture INSANENEIVIESIS · Aug 17, 2010 · Viewed 284.4k times · Source

Is there a way to add all files no matter what you do to them whether it be deleted, untracked, etc? like for a commit. I just don't want to have to git add or git rm all my files every time I commit, especially when I'm working on a large product.

Answer

Kilanash picture Kilanash · Aug 17, 2010

Try:

git add -A

Warning: Starting with git 2.0 (mid 2013), this will always stage files on the whole working tree.
If you want to stage files under the current path of your working tree, you need to use:

git add -A .

Also see: Difference of git add -A and git add .