How to add all changes to the staging area?

git add .

To add all new, modified or deleted files to the staging area use git add ..

Layer 1
Terminal Example
git status
On branch main
Changes not staged for commit:
  (use "git add/rm ..." to update what will be committed)
  (use "git restore ..." to discard changes in working directory)
    modified:   README.md
    deleted:    image.png

no changes added to commit (use "git add" and/or "git commit -a")

git add .

git status
On branch main
Changes to be committed:
  (use "git restore --staged ..." to unstage)
    modified:   README.md
    deleted:    image.png

See git add to learn more about it.

Last modified on November 30, 2021.

You might also like