Git — Status
Basic Status
git status
Status Output
On branch main
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
modified: file.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
new-file.txt
File States
| State | Description |
|---|---|
| Untracked | New file, not tracked |
| Modified | Changed since last commit |
| Staged | Added to staging area |
| Committed | Saved in repository |
Short Status
git status -s
Output:
M file.txt # Modified
?? new-file.txt # Untracked
A added.txt # Staged
Check Specific File
git status file.txt
Ignored Files
git status --ignored
Mini Practice
- Check repository status
- Understand status output
- Use short status
- Track file states
Up Next
Continue with Add — staging files.
Related Topics
Frequently Asked Questions about Status
What is Status in Git?
Status is a fundamental concept in Git. This lesson explains it step by step with clear examples, making it easy for beginners to understand.
How do I learn Status?
Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Status.
Why is Status important in Git?
Status is essential for Git development. Understanding this concept will help you write better code and solve real-world problems more effectively.