how to clone code from branch in git code example
Example 1: clone from a specific branch
git clone -b <branchName> <remote_repo_url>
Example 2: git clone single branch
# clone only the remote primary HEAD (default: origin/master)
git clone <url> --single-branch
# as in:
git clone <url> --branch <branch> --single-branch [<folder>]
Example 3: how to git clone a specific branch
# Using gh CLI
gh repo clone <username>/<reponame> -- -b <branchname>