What does a loose branch ref file such as .git/refs/heads/main contain?
- The hash of the branch's tip commit
- A diff against the parent branch
- A list of every commit on the branch
- The branch's upstream URL
A branch is just a pointer: a file holding one commit ID. History is found by following parent links from that commit.
Play Git ▸