SESK: Stuff Everyone Should Know · sesk.info/tech-git-branch-pointer
In Git, what actually is a branch?
A lightweight movable pointer to a commit, not a copy of your files.
- A full copy of every file
- A separate folder on the server
- A movable pointer to one commit ✔
Why: Making a branch in Git just creates a small label that points at a commit. When you commit on that branch, the label moves forward. That is why branching in Git is nearly instant.
Huh, didn't know that: Git knows which branch you are on through a special pointer called HEAD.
I asked Git for a new branch. It handed me a sticky note pointing at a commit.
Like this card?
References
Answer: A movable pointer to one commit. Making a branch in Git just creates a small label that points at a commit. When you commit on that branch, the label moves forward. That is why branching in Git is nearly instant.
- Pro Git book: Branches in a Nutshell git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell
A branch in Git is simply a lightweight movable pointer to one of these commits.
Checked 2026-10-10.
Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.
More stuff everyone should know
That's stuff everyone should know.