Source Control Learning Lab

Master Git. Build Better History.

A Git documentation site for collaborative developers, covering quick start, common workflows, recovery strategies, and hands-on guidance for rebase, merge, and reflog.

Commands · Workflows · InternalsFigures + Practice + RecoveryBilingual learning system

Content Channels

15Tutorial channels currently wired into the site
Command Topics70
Total Tutorials224

Recommended path

Quick Start → fetch/pull → rebase → reflog

Quick Start

Get Started Fast

Build intuition for branches, commits, and synchronization through a few low-risk commands.

01 / setup

Initialize a repository

Understand git init, git clone, identity config, and the default branch.

git clone repo-url
02 / stage

Stage and commit

Learn the three-layer model of working tree, staging area, and history.

git add . && git commit
03 / sync

Sync with remote

Master how fetch, pull, and push work with local branches.

git fetch origin

Start Here

Choose How You Want to Enter

Some readers arrive with a goal, others with a concrete problem. This keeps both entry modes in one tighter navigation surface.

By Goal

03entry points

If you want to follow a learning track, start from the job you need to accomplish.

01

Start with Git Basics

Build a reliable loop around clone, add, commit, fetch, pull, and push.

02

Team Collaboration Path

Focus on fetch, pull boundaries, pre-review sync, and shared-history safety.

03

Recovery and Undo Path

When history goes sideways, start with reflog and recovery-oriented guides.

Changelog

Latest Updates

Start with the most recently added or expanded teaching entries to catch up quickly.

Reference

Command Learning Path

Organize high-frequency commands into a progressive path.

A practical FAQ built from the Git official docs and the Pro Git book, focused on the questions people hit most often.

`git pull` first runs fetch, then integrates the upstream branch into your current branch. The official documentation describes several integration modes, including `--ff-only`, `--rebase`, `--no-rebase`, and `--squash`, so the outcome depends on your flags and config such as `pull.rebase` and `pull.ff`. If you want fewer surprises, fetch first and choose the integration strategy explicitly.

The official `git reset` manual separates them cleanly: `--soft` moves HEAD only, `--mixed` resets the index but keeps working tree changes, and `--hard` resets HEAD, the index, and the working tree together. In practice, `--hard` is the one to treat as destructive because it overwrites your current file state.

Often yes. The official `git reset` documentation explicitly points to `ORIG_HEAD` and related recovery flows after reset, merge, and pull. As long as the underlying objects have not been cleaned up yet, reflog is usually the first place to look before you decide whether to create a new branch or move a ref back.