Search notes:

.git/branches

A slightly deprecated way to store shorthands to be used to specify an URL to git fetch, git pull and git push.
A file can be stored as branches/some-name and then some-name can be given to these commands in place of the repository argument. (See REMOTES in man git-fetch)
The ultimate goal of branches should be to merge them.

upstream branch

The default branch that is merged into the branch in question (or the branch in question is rebased onto).
it is configured via branch.<name>.remote and branch.<name>.merge.
If the upstream bfranch of A is origin/B, sometimes we say "A is tracking origin/B".

Switching branches

git checkout new_branch_name
When switching to a new branch, git update .git/HEAD.

See also

.git directory structure
branch
$GIT_COMMON_DIR

Index