Menu
Coddy logo textTech

Git Status

Part of the Version Control section of Coddy's Terminal journey — lesson 7 of 58.

The most-used Git command by far is git status. It tells you the current state of your repository: which files have changed, which are staged, and which are not being tracked yet.

git status

In a freshly initialized repo with no files, the output looks like:

On branch main

No commits yet

nothing to commit (create/copy files and use "git add" to track)

Once you add files, git status highlights them under Untracked files. As you make commits, it shows what is modified, staged, or clean.

For a compact, machine-friendly view, use the short form:

git status --short

This prints one line per changed file, with a two-letter code explaining its state (we will cover those codes in the next chapter).

challenge icon

Challenge

Beginner

The folder already contains an untracked file called hello.txt. Initialize the repository, then run git status --short to see the file marked as untracked.

Untracked files appear with the prefix ??.

Cheat sheet

Use git status to see the current state of your repository:

git status

For a compact one-line-per-file view:

git status --short

Untracked files are prefixed with ?? in short format.

Try it yourself

Terminal
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Version Control