What is the difference between `git add .`, `git add -A` and `git add -u`?
BeginnerConceptCommits, branches and tags
Answer
git add -A stages new, modified and deleted files across the whole repo. git add . stages everything under the current directory (since Git 2.0 it includes deletions). git add -u stages modifications and deletions of already tracked files only, ignoring untracked ones.
More on Commits, branches and tags
How do you write a good commit message?BeginnerHow do you commit only part of the changes in a file?BeginnerHow do you change the last commit message or add a forgotten file?BeginnerWhat is the difference between `git switch`, `git restore` and `git checkout`?BeginnerWhat is the difference between lightweight and annotated tags?BeginnerHow does `git describe` work and where is it useful?Intermediate