Linux, Mac and Windows platform installation Git diagram detailed tutorial

  
Git as the world's most advanced distributed version control system (no one), presumably many people want to learn, but first we must first learn how to install Git. The earliest Git was developed on Linux. For a long time, Git could only run on Linux and Unix systems. However, some people slowly transplanted it to Windows
. Now, Git works fine on Linux, Unix, Mac, and Windows
platforms.



I will introduce you to the Git installation method on each platform:
Install Git on Linux
First, you can try to input git to see if the system has Git installed:
$ Git
The program 'git' is currently not installed. You can install it by typing:
sudo apt-get install git
Like the above command, there are a lot of Linux that will tell you Git is not installed. It will also tell you how to install Git.
If you happen to use Debian or Ubuntu Linux, you can do a Git installation directly with a sudo apt-get install git, very simple.

Older Debian or Ubuntu Linux, change the command to sudo apt-get install git-core, because there is a software called GIT (GNU Interactive Tools), Git can only be called git- Core. Since Git's reputation is too big, GNU Interactive Tools was later changed to gnuit, and git-core was officially changed to git.
If it is a different version of Linux, it can be installed directly from the source. First download the source code from Git official website, and then extract, and then type: ./config, make, sudo make install these commands to install just fine.
Installing Git on Mac OS X
If you are using Mac for development, there are two ways to install Git.
One is to install homebrew, then install Git through homebrew, please refer to homebrew's documentation for details: http://brew.sh/.
The second method is simpler and recommended. It is to install Xcode directly from the AppStore. Xcode integrates Git, but it is not installed by default. You need to run Xcode and select the menu "Xcode".->“Preferences” In the pop-up window, find “Downloads”, select “Command Line Tools", click “Install” to complete the installation.

Xcode is Apple's official IDE, very powerful, is a must-have for developing Mac and iOS apps, and it's free!
Install Git on Windows
To be honest, Windows is the worst The development platform, if you are not developing Windows games or debugging pages in IE, it is generally not recommended to use Windows. However, since it has already been on Microsoft's thief ship, there is a way to install Git.
When you use a lot of Linux/Unix tools under Windows, you need a simulation environment like Cygwin, and Git is the same. Cygwin installation and configuration are more complicated, it is not recommended to toss. However, some people have already packaged the simulation environment and Git, called msysgit, only need to download a separate exe installer, and nothing else, it is absolutely easy to use.
msysgit is a Windows version of Git, downloaded from http://msysgit.github.io/and installed by default.
After the installation is complete, find “Git”->“Git Bash” in the Start menu, and pull out a similar command line window, indicating that the Git installation is successful!

After the installation is complete The final step is also required to be entered at the command line:
$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"< Br> Because Git is a distributed version control system, each machine must self-report the door: your name and email address. You may be worried. If someone deliberately pretends to be someone else, don't worry. First of all, we believe that everyone is a good and ignorant mass. Secondly, there are ways to impersonate.
Note that the --global parameter of the git config command uses this parameter to indicate that all Git repositories on your machine will use this configuration. Of course, you can also specify a different username and email address for a repository.
Copyright © Windows knowledge All Rights Reserved