Forrest logo
back to the git tool

git-status:tldr:6ca42

git-status: Show changed files which are not yet added for commit.
$ git status
try on your machine

The command "git status" is a Git command that lets you view the current state or status of your Git repository.

When you run "git status", Git displays information about the current branch you are on, any changes made to your files, and the status of those changes. It gives you an overview of what has been modified, added, or deleted since your last commit.

The output of "git status" typically includes three main sections:

  1. On branch: This section shows the branch you are currently on. If you are on the master branch, for example, it will display "On branch master".

  2. Changes not staged for commit: This section lists any modifications you have made to files that Git is aware of, but have not yet been staged for commit. It shows which files have been modified, deleted, or added since the last commit.

  3. Untracked files: This section displays any files in your repository that are not being tracked by Git. These are typically newly created files that Git is not aware of yet.

The "git status" command is often used to check the status of your repository before performing any other Git operations. It allows you to see which files need to be staged for commit or which files are not being tracked. Based on the status output, you can decide which files to add, commit, or ignore.

Overall, "git status" is an essential command that helps you keep track of the changes in your Git repository.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the git tool