The meaning of the GitHub for Windows built-in Git Shell colors

Source: Internet
Author: User
Tags git shell

In the process of using the command-line version, the Git Shell is often used in this very elegant git version of the control environment, he uses Windows PowerShell as the core, the message display and input support Unicode, compared to the Chinese character set conversion problem When you enter a command or a branch name, there is an IntelliSense feature to help very good design; three in the process of the version control, you can see where the work is located on which branch, this tip is also very good; four often see him through the color and some special symbols to remind you of the status of your current work, But it's not really easy to know what the meaning of the color is, so it's not particularly true.

The meanings represented by different branch colors

  • Cyan (Cyan), on behalf of the local storage library and the remote repository is synchronous state!
  • Red (red), which represents the current version of the local repository is still behind the remote repository (behind), meaning that the remote repository has an existing version of the current repository , which requires git Pull grabs the remote repository to update the local repository !
    As shown below, there are 1 versions (commit) on the current remote repository that need to be synchronized back:
  • Yellow (Yellow) , which represents the current local repository Some versions are more than remote repositories and after   (behind), there are also some versions that are more advanced than the remote repository (ahead), meaning that the current remote repository has the current local repository There is no version, and the local repository also has a remote repository No version, which means you need to do   first; git pull   Get the remote repository back to update the local repository , also need through   git push   put The version of the local repository becomes more push-up. Note : Because the remote and local have version changes, this represents through   git pull   When crawling changes back, the necessary side of the issue of "merger", that is, may encounter "merger conflict" situation.  
     
  • Green (green), which represents the current local repository Some versions are more advanced than the remote repositories (aheads), meaning that the local repository has a remote repository No version, you need to push the local changes to the remote repository through git push .
    As shown below, when we first use git pull to get the remote repository back together or later, the color is " green ", which is the safest time to execute git push (there will be no conflict), and it can be the most secure. You can think like this: " when you see the green light, it's time to push the version up!" "


    As shown below, you can see that as soon as I push the changes of the local repository, the color changes back to Cyan (Cyan) !

Work record status symbol and color represent the meaning

In the Git Shell environment, there are a number of color-coded hints, which are represented by the numbers in the preceding symbols :

    • += There are n new files
    • ~= There are n files being updated
    • -= There are n files erased
    • != There are n files at the time of the merger of the conflict happened

The colors represent the following meanings:

    • Dark red (Dark red), representing these files in untracked or not staged state (will not be a commit file)
    • Dark green (Dark green), representing these files in staged state (will be the file of the commit

Here are some pictures you can read:

Connected

      • DAHLBYK/POSH-GIT-A PowerShell Environment for Git

The meaning of the GitHub for Windows built-in Git Shell colors

Related Article

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.