A branch is just a file under .git/refs/heads/ that contains the 40-character id of one commit. Making a commit on the current branch moves that file to the new commit. Creating a branch costs 41 bytes.