gor.bio wiki

Git Version Control

A distributed version control system that records the complete history of a project as content-addressed snapshots.

Category: Programming · Created: 2026-08-16 · Updated: 2026-08-16

Illustration: Git-logo
Illustration: Git-logo · Image: Jason Long, CC BY 3.0, via Wikimedia Commons.

Git is a distributed version control system created by Linus Torvalds in 2005 for the development of the Linux kernel. It records the complete history of a project — every commit, branch, and merge — in a local repository that can be synchronized with any number of remote repositories, which makes it the foundation of most modern software collaboration.

Git stores snapshots, not diffs. Each commit records the full state of the project's files together with metadata: the author, the commit message, a timestamp, and the identifiers of its parent commits. Files and directories are stored as objects (blobs and trees) that are addressed by the SHA-1 hash of their content, so identical content is stored once, and every commit's identity is cryptographically tied to its entire history. Changing any byte in the past changes every subsequent commit hash, which makes accidental or malicious rewriting detectable.

The working model has three areas. The working tree holds the files you edit; the index (also called the staging area) holds the changes selected for the next commit; and the repository holds the committed history. A typical cycle is:

git add file.php     # stage changes
git commit -m "..."  # record a snapshot
git push origin main # publish to a remote
git pull origin main # fetch and integrate remote changes

Branches are cheap: a branch is just a pointer to a commit. Creating a branch, switching between branches, and merging are local operations that do not touch the network, which encourages experimental workflows. Merging combines divergent histories; rebasing rewrites a branch's commits on top of another branch, producing a linear history at the cost of rewriting hashes.

The distributed design means every clone is a full backup: any repository can serve as the source of truth, and work can continue offline. Because history is content-addressed and immutable, Git can answer precise questions — who changed what, when, and why — for the entire life of a project, and can restore any historical state.

Tags

git software engineering version control

Related articles

This text may be freely copied, modified, and reused. See Content Reuse.