checkout to the
branch you want:
$ git checkout <branch>
$ git checkout master
If you want to keep the chances you are working you should create new branch or stash your changes.
checkout of a commit that is not the name of one of your branches will get
you a detached
SHA1 which represents the tip of a branch still
gives a detached
HEAD. Only a
checkout of a local branch name avoids
HEAD is detached, commits work like normal, except no named branch gets
updated. It is like an anonymous branch.
For example, if you checkout a remote branch without tracking it first, you
can end up with a detached
For more info: Visual Git Reference