git add -A
This simple tip, which will soon be the default in git for git add
, automatically adds ALL changes to your local cache/staging area for the next commit. What that means is that all new files are added, all changed files are added (just like with regular git add -a
), and all removed files are added (as if you ran git rm <file-name>
on each one of them).
git add -A
Enjoy!
Written by Dallas Reedy
Related protips
3 Responses
git add .
also works.
over 1 year ago
·
Oh yes, @searsaw, that's right. I don't know that git add .
in the current version of git automatically removes manually deleted files, but it will add all new files as well as all changed files.
over 1 year ago
·
Very useful, thank you.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#