Git checkout another branch

Viewed 140271

I run:

 git checkout mygithub/master

but for some reason, running 'git status' shows "not currently on any branch". Running:

 git checkout master

and then git status, says that I'm now on branch master. Now I want to switch to another branch. Running git checkout anotherbranch works, but git status says I am still on branch 'master'. What am I doing wrong?

3 Answers

If you want to checkout from master branch just run this command in your terminal

git checkout -b BRANCH_NAME

Related