Bitpath

Lesson 1 · Unit 02

Refs and HEAD

A branch is forty characters in a file

13 exercisesabout 3 min

What you practise

  • A branch is a file holding a commit hash, HEAD points at a branch, committing moves the branch, git switch -c, detached HEAD without fear

Try a question from this lesson

Pick one

A repository has 10,000 commits. You create a new branch. Roughly how much does git write to disk?

The idea

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

Two kinds of pointer

A branch is a file holding one commit hash. main is the file .git/refs/heads/main.

HEAD holds the name of the branch you are on. When you commit, git writes the new commit and moves that branch to it. No other branch moves.

one <--- two <--- three
                    ^
                   main <--- HEAD

11 more exercises in the app

  • 4× multiple choice
  • 3× type the answer
  • 1× fill the blanks
  • 1× true or false
  • 1× order the lines
  • 1× match the pairs

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy