How does GitHub api get the content of a branch?

for example, I am working on my own github api. Only the data url of the main branch can be pulled through api. Can"t get the other branches.

Sep.11,2021

two ways:
1. Specify a branch of clone

git clone -b <branch_name> <repo_name>
:
git clone -b my-branch git@github.com:user/myproject.git

go to the warehouse under 2.clone and switch to the branch you need

git clone git@github.com:user/myproject.git

git branch -a 

git checkout <branch_name>
Menu