Skip to content
academia.sh

Course Beginner

Introduction to Version Control

By the end of this course

Start course

01

The Idea of Version Control

The problem version control solves, the difference between centralized and distributed designs, and the creation and configuration of a repository.

  1. 01 What Is Version Control The problem version control solves; the promises of history, reversibility, and collaboration; and a comparison of snapshot-based and diff-based storage.
  2. 02 Centralized and Distributed Models The design consequences of keeping history on a single server versus in every copy; the reason a version's identity is produced from a content hash rather than an increasing number.
  3. 03 Creating and Configuring a Repository Turning an empty directory into a repository, the contents of the `.git` directory, and the precedence of the system, user, and repository configuration layers.

02

The Basic Cycle

The three-region model, the atomic-commit habit, writing commit messages, reading history, examining diffs, and ignore rules.

  1. 01 Working Directory and Staging Area The definition of the three-region model; the two separate writes `git add` makes to the object database and the index; verifying the blob object and content-addressed storage by eye.
  2. 02 Committing Changes The staging area turning into a permanent record; the content of tree and commit objects, the four object types, the role of refs, and the atomic-commit habit.
  3. 03 Writing Commit Messages The message structure made up of the subject line, the blank separator, and the body; recording the rationale, and how tools make use of the message format.
  4. 04 Reading History Formatting the log's output; filtering by path, content, author, and time; revision-range notation, and reading the commit graph directly.
  5. 05 Examining Diffs Three separate comparisons between the working directory, the staging area, and commits; reading the unified diff format, and diffing at the object level.
  6. 06 Ignore Rules Files that should not enter the repository; `.gitignore` pattern syntax; finding a rule's source, and why ignore rules do not apply to tracked files.

03

Undoing

Unstaging and restoring files, amending a commit, reset modes, reverting, the stash, and tagging.

  1. 01 Unstaging and Restoring Files Undoing the staging-area record and the working-directory content separately; choosing a source, and which situations are recoverable.
  2. 02 Amending a Commit Fixing the last commit's message or content; producing a new object because a commit is immutable, the reflog, and the limit of shared history.
  3. 03 Reset Modes Moving the branch tip backward; the effect of the `--soft`, `--mixed`, and `--hard` modes on the three regions, lost content, and recovery through the reflog.
  4. 04 Reverting A new commit that reverses another's effect; undoing without disturbing history, verifying with the tree ID, reverting without committing, and reverting a revert.
  5. 05 Stash Temporarily setting aside unfinished work; the stash stack, inspecting its content, including untracked files, and what the stash corresponds to in the object model.
  6. 06 Tagging Giving permanent names to specific points in history; the difference between a lightweight tag and a tag object, the fourth object type, locating position by tag, and semantic versioning.

Start typing to search.

↑↓ Esc navigate · open · close