Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

git status command

git status command

Git Basic OperationsGit Basic Operations


git status is a command used to view the current status of a Git repository.

git status The command can check whether files have been modified again since your last commit.



$ git status

On branch master



Initial commit



Changes to be committed:

  (use "git rm --cached ..." to unstage)



    new file:   README

    new file:   hello.php

The git status command displays the following information:

Based on the output of git status, you can determine the status of files in the current working directory and take appropriate action.

Usually we use the -s parameter to get a short output result:



$ git status -s

AM README

A  hello.php

The AM status means this file was modified again after we added it to the cache.


Git Basic OperationsGit Basic Operations