3 ms·
In git, branches are pointers to commits (branches are a specific kind of refs or references). When you commit, git creates a new commit object, links it to the
by _ikke_ 10y ago
In git, branches are pointers to commits (branches are a specific kind of refs or references). When you commit, git creates a new commit object, links it to the last commit on
that branch, and then points that branch to the new commit.
This way, you get a chain of commits, each pointing to the previous commit, and and branch references pointing to the last commit of each branch.