CurriculumGit Basicsgit status & git log
Lesson 6 of 6100%
Beginner6 min+60 XP

git status & git log

git status and git log are the two most-used read-only commands in Git. Status shows the current state of your working directory. Log shows the history of committed snapshots. Run them constantly — they never change anything.

01.git status — Your Working Directory Dashboard

git status shows three zones: (1) Changes staged for commit — green, ready to commit. (2) Changes not staged — modified files Git is tracking but not yet added. (3) Untracked files — files Git sees but ignores until you add them. The short form (-s) is great for a quick one-line overview.

Git's Three Areas
📁
Working Dir
Your files
→ git add
📋
Staging Area
Prepared
→ git commit
🗄️
Repository
.git/ history

02.git log — Reading Project History

git log shows commits newest-first. Each entry shows: the SHA hash (unique ID), author name and email, date and time, and the commit message. Use --oneline for a compact view, --graph to see branch topology, --all to include all branches, and combine them for a powerful repository overview.

Commit Timeline
a1b2c3d
init
b2c3d4e
feat
c3d4e5f
fix
d4e5f6a
HEAD

Commands

commands — click to reveal output
$
git status
Full working tree status
▼ show output
$
git status -s
Short compact status (M=modified, ??=untracked)
▼ show output
$
git log
Full commit history with all details
$
git log --oneline
Compact one-line-per-commit view
▼ show output
$
git log --oneline --graph --all
Visual branch graph of entire repository
▼ show output
$
git log --author="Alice"
Show only commits by a specific person
$
git log --since="1 week ago"
Show commits from the last week only
KNOWLEDGE CHECK

What does git status show you?

Rate this lesson:
PreviousNext Lesson