Lesson04
beginnerUnderstanding git status
Goal
Read git status and use it to decide what to do next.
git status is the command you will run most often. It never changes anything; it tells you which branch you are on and how your files differ from the last commit.
This repository already has one commit, and someone has been working in it since. Use git status to find out what changed. The objectives describe files by where git status lists them, not by name.
Objectives
0/3- Stage the file that
git statuslists under Changes not staged for commit. (Current objective) - Stage the file that
git statuslists under Untracked files. (Not started) - Commit your staged changes until
git statusreports a clean working tree. (Not started)
Your task nowStep 1 of 3
Stage the file that git status lists under Changes not staged for commit.
Need help?
Reference
Reading the report
$ git status
On branch main Changes to be committed: (use "git restore --staged <file>..." to unstage) new file: app.js Changes not staged for commit: (use "git add <file>..." to update what will be committed) modified: README.md Untracked files: (use "git add <file>..." to include in what will be committed) notes.txt
- Changes to be committed are staged: they will go into the next commit.
- Changes not staged for commit are edits to tracked files that are not staged yet.
- Untracked files are new files Git has never recorded.
When nothing is left in any section, Git reports nothing to commit, working tree clean.
Preparing your workspace…
Repository Graph
Click a commit to inspect it
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.
