To Clone single branch in Git, you must use the
–single-branch option to clone and fetch only the branch you selected.
git clone --single-branch --branch <branch_name> <url_of_repository>
In order to clone only the primary head i.e., origin/master by default. Use the below command.
git clone <url> --single-branch