Git - File Status


The status of a file in a working directory is one of:

Git File Lifecycle


  • untracked See untracked
  • unmodified
  • modified
  • staged means that the file is in the index (proposed next commit)

Tracked / Untracked

Each file in a working directory can be in one of two states:


Tracked files are files that were in the last snapshot; they can have the status:

  • unmodified,
  • modified,
  • or staged (ie in the index for the next commit)


Untracked files are new files.

More specifically, they are any files in the working directory that:




git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   syntax.php

no changes added to commit (use "git add" and/or "git commit -a")

Discover More
Git - Add command (Staging) - Add a change to the next commit

Add file contents to the staging area (known also as the index). This statement will add all files and any new untracked files.
Git - Checkout

A checkout will change the current branch Specifically, it will checkout the files from the repository for a branch in the working directory to match the version in the index (staging area) ...
Git - File

File management in Git (blob and not directory) blob object on the local file system or not (ie in the git file system database) See and short status A file (or blob) identifier is the...
Git - Getting Started

An article that takes the basic steps in order to set up a Git repository When you want to set up a repository, you face generally two options: you want to create a fresh install from a Git repository...
Git - Git (executable|command line)

The git executable where: --git-dir is the location of the repository files --work-tree is the location of the work tree Command Description add Add file contents to the index add--interactive...
Git - Working (Tree|Area)

The working tree (or working area) is a directory where the work happens (extraction, modification, commit). It's on the local file system: a directory where the files of the git repository have been...
What are short status ?

short status is a one letter that summarize the file status Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R), have their type (i.e. regular file, symlink, submodule, …)...

Share this page:
Follow us:
Task Runner