checkout specific branch git code example
Example 1: how to check in which brach we are in git
git branch -a # it will show an astrick * like *master
git branch --show-current # source == git remote --help
Example 2: clone specific branch
git clone --single-branch --branch <branchname> <remote-repo>
Example 3: how to clone a specific branch from github that you are not working
git clone -b <branch> <remote_repo>