I usually use this to clone a github repo in colab
!git clone https://github.com/user/repo.git
But say I want to clone a specific branch of the repo. I tried
!git clone https://github.com/user/repo/tree/branch.git
But I get an error
fatal: repository 'https://github.com/user/repo/tree/branch.git/' not found