Hi guys, so, i believe that you guys use git, or most of you use it... So, here's a interesting thing.
About the command:
git add -A
The documentation said something about the user making changes to the "staging area”, but i used “git add . “ and it added everything i needed, in the past.
i’m just looking for a comparison between
“git add . “ and “ dig add -A”
Jum. Interesting. When I first learned git I used git add . however, in a newer version of Git, I recall a mesage saying something about using git add -A instead of the former way.
Since then, I've only used git add -A without questioning myself about.
Gonna take a look in the docs 😎
Milica Maksimović
founder Literally.dev, ex-Growth @wasp, former Community Manager @Hashnode
git add -Aadds new files, records updates from files which have been changed, and also ensures that files which have been removed from the directory are also removed from the git tree.git add .only adds new files and modified files to the tree, does not remove the ones which have been removed from the directory.Overall, I'd say
git add -Ais a safer option.