git status command
git statusis a command used to view the current status of a Git repository.
git statusThe command can check whether files have been modified again after your last commit.
$ git status On branch master Initial commit Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: README new file: hello.php
The git status command displays the following information:
- The name of the current branch.
- The relationship between the current branch and the remote branch (e.g., whether it is up to date).
- Unstaged changes: shows files that have been modified but not yet
git addThe list of files added to the staging area. - Untracked files: shows a list of new files that have not yet been added to version control.
Based on the output of git status, you can determine the file status in the current working directory and take appropriate actions.
Usually we use-sparameters to get a concise output result:
$ git status -s AM README A hello.php

AMThe status means that the file has been modified again after we added it to the cache.
other extensions