Git status Brief

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.