Git branch creation and merging, code pull and push local and undo modification, multi-person collaboration conflict resolution enterprise-level combat

1. Git installation and repository creation

1. Git installation

The earliest Git was developed on Linux. For a long time, Git could only run on Linux and Unix systems. However, slowly someone ported it to Windows. Now, Git can run normally on several major platforms such as Linux, Unix, Mac and Windows.

First, you can try to enter Git to see if Git is installed in the system:

[root@redis1 ~]# git
bash: Git: command not found...

This prompt indicates that Git is not installed, then install it through yum:

[root@redis1 ~]# yum install git

If you want to install through the source code, first download the source code from the Git official website (https://git-scm.com/), then decompress it, and then enter: ./config, make, make install these commands to install it.

After the installation is complete, the last step is to set up, enter at the command line:

$ git config --global user.name "Your Name“
$ git config --global user.email [email protected]

Pay attention to the --global parameter of the git config command. Using this parameter means that all Git warehouses on this machine will use this configuration. Of course, you can also specify a different user name and email address for a certain warehouse.

2. Create a repository

The version library is also known as the warehouse, and the English name is repository. It can be simply understood as a directory. All files in this directory can be managed by Git#

Guess you like

Origin blog.csdn.net/qq_35029061/article/details/131997070