Asked about Git as you actually use it
What is a branch in git?
An answer that works
A file containing one commit hash, plus an entry in HEAD saying which branch you are on. The commits are not stored in the branch, so creating and deleting branches is instant and costs nothing, and deleting one does not delete any commits.
Then they push further
Then why does rebasing change the commit hashes?
A commit's id is a hash of its contents, its metadata and its parent. Rebase gives the commits a different parent, so they hash differently. The originals are still on disk until they are garbage collected, which is why the reflog can get them back.
What gets marked up
Strong answers describe the graph and the pointer. Describing a branch as a copy of the code is the answer that predicts trouble later.
Reading an answer is not being able to give one. The section that teaches this is Git as you actually use it, 5 hours of Git & collaboration.
Learn this properlyAlso asked about Git & collaboration