git statuscommand to list all files in the current directory that have not yet been managed by git, and files that have been managed by git and have been modified but not yet committed (git commit). for example;git status# on Branch master# Changes to be committed:# (use "git reset HEAD <file> ..." to Unstage)## Modified:2.txt## Changes not staged for commit:# (use "git add <file> ..." To update what would be committed)# (use "Git checkout-<file> ..." to discard changes in working directory)## Modified:1.txt## untracked files:# (use "git add <file> ..." to include in what'll be committed)## 1.logThe content listed in "Changesto is committed" in the command is the content in index, and commits to git Directory. command in the "Changed but not updatedThe content listed in working directory, and add will enter index. command in the "untracked Files"The content listed in is not yet tracked by Git, and the add goes to index viagitStatus-unoOnly files that have been managed by git and have been modified but not submitted can be listed. Like what:$ touch 3.txt$ git add 3.txt$ git Status-uno# on Branch master# Changes to be committed:# (use "git reset HEAD <file> ..." to Unstage)## Modified:1.txt# New File:3.txt## Changes not staged for commit:# (use "git add <file> ..." To update what would be committed)# (use "Git checkout-<file> ..." to discard changes in working directory)## Modified:2.txt## untracked files not listed (use-u option to show untracked files)Over here1.txt,2.txtTwo files are files that have been submitted.1.txtwas modified and was executed by git Add.2.txthas been modified but has not been executed by git Add.3.txtis a newly created file that has been executed by git Add. also note that we can use the git add-i command to view All files that have been modified or deleted in <path> but not submitted, It has a git status feature and more about the git add command, please refer to "git add details "
Git status Brief