Git was born on the Linux platform and served as a version control system for the Linux kernel, so it's very convenient to install Git on Linux. There are two different ways to install Git on Linux: one is to install a compiled binary-formatted GIT package through the Linux distribution Package Manager, and the other way is to start the installation from Git source.
Package Manager Mode Installation
It's easiest to install git with the Linux distribution Package Manager, and it's automatically configured with command completion, but the GIT installation may not be the latest version. It is also important to note that GIT packages may not be called Git in some Linux distributions, but rather called Git-core. This is because there is a GNU software called the GNU Interactive Tool (GNU Interactive tools), which takes the name of git before git in some Linux distributions (Deian Lenny). To differentiate, Git is so famous as a version control system, so some Linux distributions change the name of the GNU Interactive Tools package from Git to Gnuit in the latest version, changing Git-core to Git. So when you install Git in a different Linux distribution, as described below, you'll see that git and Git-core have two different names.
--ubuntu 10.10 (Maverick) or newer version, Debian (squeeze) or newer version:
$ sudo aptitude install git$ sudo aptitude install git-doc git-svn git-email Git-gui gitk
The GIT package contains most of the Git commands and is a must-install package. The package GIT-SVN,GIT-EMAIL,GIT-GUI,GITK was originally part of the GIT package, but was released separately as a package because it was trusted by different software packages. The package Git-doc contains Git's HTML-formatted document, which you can choose to install. If you have a git HTML-formatted document installed, you can use the git help-w <sub-command> command to get HTML Help from a Web browser to open related subcommands <sub-command>.
Installation and use of Git (Linux)