Lesson 03
Staging Area
The staging area lets you choose which changes will go into your next commit.
Visual Explanation
Working Directory
Unstaged changes only
app.jsModified
Staging Area
Snapshot for the next commit
Empty
app.js has an unstaged change. The file itself remains in your project.
The Real Command
Terminal
git add app.jsgit add app.js prepares that file's current changes for the next commit.
Command Details
git add -- "*.js"* is a quoted Git path pattern. The quotes pass the pattern to Git, and -- ends option parsing.
git add .. means this directory. It stages all current changes below this folder, so review git status first.
Knowledge Check
Build the Next Checkpoint
Choose a change for the next commit and separate staging from committing.
Question 1 of 5
- Question 1: current
- Question 2: not started
- Question 3: not started
- Question 4: not started
- Question 5: not started