Chapter 2. Installing Git

At the time of this writing, Git is (seemingly) not installed by default on any GNU/Linux distribution or any other operating system. So, before you can use Git, you must install it. The steps to install Git depend greatly on the vendor and version of your operating system. This chapter describes how to install Git on Linux and Microsoft Windows and within Cygwin.

Using Linux Binary Distributions

Many Linux vendors provide precompiled, binary packages to make the installation of new applications, tools, and utilities easy. Each package specifies its dependencies, and the distribution’s package manager typically installs the prerequisites and the desired package in one (well-orchestrated and automated) fell swoop.

Debian/Ubuntu

On most Debian and Ubuntu systems, Git is offered as a collection of packages, where each package can be installed independently depending on your needs. Prior to the 12.04 release, the primary Git package was called git-core. As of the 12.04 release, it is simply called git, and the documentation is available in git-doc. There are other packages to consider, too.

git-archgit-cvsgit-svn

If you need to transfer a project from Arch, CVS, or SVN to Git or vice versa, install one or more of these packages.

git-guigitkgitweb

If you prefer to browse repositories in a graphical application or your web browser, install these as appropriate. git-gui is a Tcl/Tk-based graphical user interface for Git; gitk is another Git browser written in Tcl/Tk but ...

Get Version Control with Git, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.