Sometimes we need all the branches available in our local system. Lets see how can we clone a github repository with all the available branches.
Clone the whole repository as bare. It will copy all the branches.
$git clone –bare https://github.com/
Make the bare repository to a regular github repo.
$git config –bool core.bare false
Reset head pointer of git to last state.
$git reset –hard
All the branch will be available
I have got this nice info from https://www.lynda.com/Express-js-tutorials/Building-Website-Node-js-Express-js/502310-2.html