Please see the following post: Git checkout of a branch destroys local reference to master - #16 by pete-woods