0/3

Lesson07

beginner

Stage Your First File

Goal

Move changes from the working tree into the staging area with git add.

This repository was just initialized, and all three project files are untracked. Stage them one at a time first, then learn the shortcut for staging everything that is left.

Keep an eye on the Working Tree and Staging Area panels as you go.

Objectives

0/3
  1. Stage README.md. (Current objective)
  2. Stage index.js. (Not started)
  3. Stage the remaining file using the shortcut that stages everything. (Not started)

Your task nowStep 1 of 3

Stage README.md.

Need help?

Reference

Staging a single file

$ git add README.md

git add prints nothing when it succeeds, like most Git commands. Run git status afterwards: the file moves from "Untracked files" to "Changes to be committed".

Staging everything at once

$ git add .

The . means "this folder". Every new, modified or deleted file inside it is staged.

Preparing your workspace…

Repository Graph

Click a commit to inspect it

0 commits

Working Tree

Not a Git repository yet

No unstaged changes

Your working tree matches the staging area.

Staging Area

Files prepared for the next commit

No staged changes

Use git add to prepare files for your next commit.

Repository

Committed history

No commits yet

Use git commit to record staged changes.