Skip to content

Definition

A branch is a movable pointer to a commit in a version control system; creating a branch is O(1) because it only writes a 40-byte file, and switching branches rewrites the working tree to match the target commit.