Directory
- Iv. install and configure git
- (1) Installation
- (2) Configuration
- (3) create a warehouse
- 5. Git basic commands
- 6. Git Branch
In the previous article, I talked about the basic principles of git. I suggest you look at it before, and then let's talk about the specific operations and commands of git this time.
Iv. install and configure git
This section describes the operations that are set once and do not need to be modified for a long time.
(1) Installation
The download and installation methods of git are available on the official website.
(2) Configuration
The following command is used to modify the user name mailbox and create the command alias.
git config --global user.name yanhaijinggit config --global user.email [email protected]git config --global alias.st status #git stgit config --global alias.co checkout #git cogit config --global alias.br branch #git brgit config --global alias.ci commit #git ci
(3) create a warehouse
Git init // locally generate git clone URL // remote repository pull
5. Git basic commands
The following figure shows the basic git commands:
This figure covers most of the commands for transferring files between three regions and a remote warehouse.
6. Git Branch
The Branch is widely used in git. What is the branch? In version control, the branch development direction is uncertain due to various reasons during the development process, two or more directions must be extended for independent development, which forms a branch. I have found a good article on branch operations. You can directly view this article: git's practical summary, and you will never be afraid of poor memory.
This is the common git operations. We recommend that you read the documents on the official website, which contains all the GIT commands.
Development Tool git (2)