Git is a distributed version control system that tracks changes in source code during software development, enabling multiple developers to work on projects simultaneously without conflicts. GitHub is a cloud-based platform built on Git that adds collaboration features like pull requests, issue tracking, merge queues, and continuous integration. Together, they form the backbone of modern software development workflows — Git handles the local version control while GitHub facilitates team collaboration, code review, and project management at scale. As of Git 2.54 (2026), the toolset continues to evolve with improved sparse-checkout, background maintenance, and history-editing capabilities.
What This Cheat Sheet Covers
This topic spans 27 focused tables and 169 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Repository Initialization and Cloning
Every Git workflow starts here — either creating a fresh repository from scratch or pulling down an existing one. The flags matter more than they first appear: a shallow or sparse clone can turn a multi-gigabyte monorepo into a fast, lean checkout, while a bare repo is what actually lives on a server to receive pushes.
| Command | Example | Description |
|---|---|---|
git init | Initializes a new Git repository in the current directory, creating a .git folder to track changes. | |
git clone https://github.com/user/repo.git | Downloads a complete copy of a remote repository including all history, branches, and tags to your local machine. | |
git clone --depth 1 https://github.com/user/repo.git | Creates a shallow clone with limited commit history, reducing download size for large repositories. |