git Distributed version control system, created by Linus Torvalds

Git

Git is a free and open-source distributed version control system designed to track changes to files — almost always source code — efficiently and reliably, even across projects with thousands of contributors. It was created by Linus Torvalds in 2005 to manage development of the Linux kernel, after the kernel project lost its license to use the proprietary BitKeeper system. Git has since become the de facto standard version control system for software development, underpinning platforms like GitHub, GitLab, and Bitbucket.

git init                      # start tracking a new repository
git add .                     # stage changes
git commit -m "message"       # record a snapshot
git push origin main          # share it with a remote

Why "distributed"?

Unlike older, centralized systems (CVS, Subversion), every Git clone is a complete repository with its own full history — not just a working copy of the latest files. This has a few direct consequences:

  • You can work fully offline. Committing, branching, diffing, and browsing history don’t need a network connection; only push and fetch do.
  • There is no single point of failure. Any clone can restore the entire project if a central server is lost.
  • Branching and merging are cheap. A branch is just a movable pointer to a commit, not a full copy of the codebase, so creating one is near-instant.
  • History is content-addressed. Every commit, file, and tree is identified by the SHA-1 (or, in newer repositories, SHA-256) hash of its contents, so history can’t be silently altered without the hashes changing. See How Git Works.

Install

Arch Linux:

sudo pacman -S git

Debian / Ubuntu:

sudo apt install git

Fedora:

sudo dnf install git

macOS (Homebrew):

brew install git

See Getting Started for Windows, verifying the install, and the one-time identity setup every new install needs.

  • Source: git/git on GitHub
  • License: GPL-2.0
  • Official site: git-scm.com
  • Created by: Linus Torvalds, first released April 7, 2005

These pages are independent, community-style reference documentation for Git. They are not affiliated with the Git project or the Software Freedom Conservancy. For the canonical reference, see the official Git documentation and the Pro Git book, which is free to read online.