After cloning a remote repository it does not show any remote branch by -a option. What could be the problem? How to debug it? In this snippet two of the remote branches are
From reading the responses and the comment from @jthill, the thing that worked best for me was to use the set-branches option on the git remote command:
$ git clone --depth 1 https://github.com/dogescript/dogescript.git
$ git remote set-branches origin 'remote_branch_name'
$ git fetch --depth 1 origin remote_branch_name
$ git checkout remote_branch_name
This changes the list of branches tracked by the named remote so that we can fetch and checkout just the required branch.