This repository is used to sort key concepts and test all kinds of usage or workflow around git so as to help me grasp this tool.
Commit object
A branch is just a lightweight movable pointer to a commit object, usually points to the last commit, every time when commit, it moves forward automatically.
Branch pointing into the commit data’s history
When create a branch, a new pointer is created, use git branch.
A HEAD is a pointer of pointer, pointing to the local branch the user is currently on.
HEAD file pointing to the branch you’re on
To switch to an existing branch, use git checkout git checkout testing
see [ref.1]
- a successful git branching model (gitflow workflow)
- practice in detail on gitflow workflow
[ref.1] | http://git-scm.com/book/en/Git-Branching-What-a-Branch-Is |