Though there are already a lot of answers and the commands below are supposed to work:
git pull
or git fetch
git checkout <remote_branch>
But in my case, i was not able to get all the remote branches, though git pull or git fetch was not throwing any error, but when i ran git branch -a
, it was showing my local branches and one remote branch, which was not even right.
To fix that, i simply removed the remote:git remote remove origin
then add the remote again:git remote add origin <remote_url>
Then, run the above commands:git pull
or git fetch
and thengit checkout <remote_branch>