Skip to main content

What is the difference between `git log` and `git status`?

In short

git log and git status answer different questions:

  • git logwhat happened before
  • git statuswhat is happening now

git log - commit history

The git log command shows:

  • commits that are already saved
  • the project's change history
  • who made each commit, when, and with what message

Important:

  • git log only works with commits
  • it does not show uncommitted changes

The repository's past.


git status - current state

The git status command shows:

  • changed files that are not yet committed
  • which files are added to the staging area
  • which files are untracked
  • which branch you are on

The repository's current working state.


Side-by-side comparison

CommandWhat it showsAbout
git logCommitsThe past
git statusFilesThe present

A typical real-life situation

You wrote some code and think:

  • "What have I already committed?"git log
  • "What is changed now and ready to commit?"git status

An important point for an interview

git status never changes history, it only shows the state. git log also changes nothing, it only reads history.

Both commands are safe (read-only).

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.