</>
Skip to content
Git lessons (8/44)

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

StateDescription
UntrackedNew file, not tracked
ModifiedChanged since last commit
StagedAdded to staging area
CommittedSaved 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

  1. Check repository status
  2. Understand status output
  3. Use short status
  4. 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.