A git branch is a pointer to commit. Git repository's current branch is HEAD, which means next commit will be here.

Here is a git repository, in which there are two branches, master and dev. Current branch is master.


If checkout/switch to dev branch. The HEAD point moves to dev.


Branching in git does not require creating new folders. Branches are all in one working directory. When switching between branches, git cleans up and re-creates the working folder and moves HEAD.

Nice and easy.

Last edited Nov 12, 2011 at 1:18 PM by yysun, version 4


No comments yet.