Git Reality (iv) state transitions

Source: Internet
Author: User
Tags git commands

Pre-git Combat (iii) Environment build blog post. We have a general explanation of the installation of the GIT environment. Today we'll explain Git's state transitions.

Learn the version number control tool. It is important to change the state between the tool version number control.

After all, Git is just a tool, assuming you don't know why every step of the tool is working, then learning git doesn't make much sense.


git initializationbefore learning git state transitions, let's start with Git initialization, which is to create a git version number library locally. Unlike SVN's creation of a unique version number library on the server, the GIT version number library can be created with the client free of need in the client. Its number and location are not subject to any limitations. The git init command, as seen below:
Git init demo
The demo is initialized with the name of the version number library. To determine what git initialization does, we can use the list to check commands, such as the following:
Ls-af

By looking at what you can see, git initializes a. git folder under the specified folder, which holds all the data and resources needed for the GIT version number library. Detailed information, assuming that interested can be self-checking.


git state transitionsafter Git initializes, it declares a version number library. We haven't started tracking any of the files in the management project, so the next thing to do is to include some files in the Git version number that we need to control the version number.
In a daily git operation, all of Git's operations are roughly three areas. The work area, tracking area, and history area. The transition relationship between the three. For example, as seen in:
from the. We were able to see conversions between three workspaces. It's roughly divided into four commands, each of which is git add, git commit, git reset, and git checkout. Four kinds of operations for what. I will be in detail in the following detailed article analysis, here we first understand. To make it easier for readers to understand the transition relationship between three workspaces. Let's look at a more careful example of what we see here:
from there, we can see that in addition to the four Git commands, the daily commands are like git clone, git rm, git revert, and so on. The same, I will be in the next detail of the detailed article analysis, here you can understand.

End We ended up with a macro explanation of git, which is very important for git to understand. I will continue in-depth analysis in the next article.

Please pay attention!

Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

Git Reality (iv) state transitions

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.