Here is the command
git checkout -b local //here we are creating local branch and checking it out in sigle command
In case you want to switch between branches just use checkout command
git checkout master // to get into master branch git checkout local // to get into local branch again