$ ./guess_the_languageGit
Git · medium · #41

What does a loose branch ref file such as .git/refs/heads/main contain?

  1. The hash of the branch's tip commit
  2. A diff against the parent branch
  3. A list of every commit on the branch
  4. 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 ▸