Learning path

Full curriculum

Full curriculum

Unit content

Version control

Software and documents change over time. Version control records those changes so that earlier states can be inspected, compared and restored.

Repository and working copy

A version-controlled project has a repository containing recorded history and a working copy containing the files currently being edited.

A recorded snapshot is commonly called a commit or revision.

Diffs

A diff describes how one version differs from another. Instead of treating a project as unrelated copies such as final, final2 and final-really, version control gives changes explicit identity and history.

Branches

A branch lets development continue from an existing revision without immediately changing another line of work.

Branches can later be combined through a merge. If both lines changed incompatible parts of the same content, a merge conflict must be resolved by deciding the desired result.

History has meaning

Useful commits represent coherent changes and record why the project moved from one state to another. History then becomes a tool for understanding the evolution of the system, not merely a backup mechanism.

Collaboration is optional

Version control can be valuable for one person working entirely on one computer. Networked hosting and collaboration build on the same repository model but are not required for understanding version control itself.