It will be a little hard to describe Git branching well , so I may vastly reference contents from 《Pro Git》
Before the introduction of Git Branching, let’s see what git actually dose when we are making commit by running command git commit
at first.
Figure 1.1
when you create the commit by running git commit, Git checksums each
subdirectory and stores them as a tree object in the Git repository.
Then Git creates a commit object that has the metadata and a pointer
to the root project tree so it can re-create that snapsht when needed. --《Pro Git》
You can see now we have five objects in our git repository, they are three blobs, one tree and one commit.