About git installation

Git was first developed on Linux, and for a long time, Git could only run on Linux and Unix systems. However, slowly someone ported it to Windows. Git now runs on Linux, Unix, Mac, and Windows.

To use Git, the first step, of course, is to install Git. Determine your own installation options according to your personal situation. The following mainly introduces the installation methods on Linux and git:

Install Git on Linux

First, you can try typing gitto see if Git is installed on your system:

After installation, the following message will appear:

If it is not installed it will show:

$ git
The program 'git' is currently not installed. You can install it by typing:
sudo apt-get install git

A lot of Linux will kindly tell you that Git is not installed, and will tell you how to install Git.

If you use Ubuntu Linux system, sudo apt-get install gityou can directly complete the installation of Git through one step, which is very simple.

If it is other Linux versions, you can install it directly from the source code. First download the source code from the Git official website, then decompress it, and enter: ./config, make, sudo make installthese commands are installed.

Install Git on Windows

When using many Linux/Unix tools under Windows, you need a simulation environment like Cygwin, and Git is the same. Cygwin's installation and configuration are more complicated, so it is not recommended for you to toss. However, some experts have already packaged the simulation environment and Git, called msysgit. You only need to download a separate exe installer, and nothing else needs to be installed. It is absolutely easy to use.

Download it from https://git-for-windows.github.io , and install it by default.

After the installation is complete, find "Git" -> "Git Bash" in the start menu, or left-click on the mouse desktop and select Git Bash to pop up something similar to a command line window, which means that the Git installation is successful!

install-git-on-windows

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

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

Because Git is a distributed version control system, every machine must report itself: your name and email address. You might be worried, what if someone deliberately impersonates someone else? There is no need to worry about this. First of all, we believe that everyone is a kind and ignorant masses. Second, there are ways to check if there are people who are pretending to be.

Pay attention git configto the parameters of the command --global. Using this parameter means that all Git repositories on your machine will use this configuration. Of course, you can also specify different usernames and email addresses for a certain repository.

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325566012&siteId=291194637