Checking Repository Status
You'll learn how to inspect the current state of your Git working directory and staging area using git status.
Why Check Status?
When working with Git, you're constantly modifying files, staging changes, and preparing commits. It's easy to lose track of what's changed, what's ready to commit, and what Git isn't tracking yet. The git status command gives you a snapshot of your repository's current state—think of it as asking Git, "What's going on right now?"
What git status Shows You
When you run git status in your repository, Git reports three categories of files:
Modified files are files you've changed since your last commit but haven't staged yet. Git knows they're different from the committed version.
Staged files (also called "changes to be committed") are files you've added to the staging area with git add. These are ready to be included in your next commit.
Untracked files are files in your working directory that Git isn't monitoring at all—you've never added them, so Git ignores them unless you explicitly stage them.
The Feedback Loop
Think of git status as your dashboard. Before staging changes, run it to see what you've modified. After staging, run it again to confirm what will go into your next commit. It's your primary tool for staying oriented in the three-state Git workflow (working directory → staging area → repository).
The command is safe to run anytime—it only reads information, never changes anything.
Key Takeaway: Use git status frequently to see which files are modified, staged for commit, or completely untracked—it's your window into Git's current state.