Version Control Basics (git status, diff, log)
Concept & Overview
Modern Linux servers and cloud infrastructure rely on Git for version control, continuous integration, and infrastructure-as-code deployments. Let's master the core introspection commands.
- git status: Checks working tree and staging area state, revealing modified, untracked, and staged files.
- git diff: Shows line-by-line differences between modified files and the last commit.
- git log: Displays commit hashes, author metadata, and change messages.
git status, inspect file modifications with git diff, and review repository history using git log.Command Syntax Reference
| Command / Syntax | Description |
|---|---|
git status | Display repository and staging area status |
git diff | Display line-by-line diffs of modified files |
git log | Display commit history log |
Verification Objectives
These conditions will be automatically verified when you run commands inside the interactive terminal simulator:
- ○Run git status
- ○Run git diff
- ○Run git log
Ready to complete Quest 146?
Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.