Git Tips: Learn the difference between git add --all & git add .
In this article, you will learn the difference between git add -- all and git ad .
1 min readJan 12, 2020
The Same:
Both command help you add files into Staging Area.
Tha Difference:
If you use
git add -- all#You will add all the (project) directories into staging area.
If you use
git add .#You will add only the current working directory(including sub-directory) into staging area.
Conclusion:
If you want to add only current working directory(and sub-directory) into staging area, please use “git add . ”
If you want to add all the (project) directories into staging area, please use “git add --all”
For more Git/Github tips, you can check my Git/Github note on this page