Search code examples
gitgit-clone

While cloning git repository it is cloning only from "main" branch


While cloning the Git repository it is cloning from "main" branch where I have only the README file. But I have another branch and from that branch code, I want to get a clone.

But whenever I hit git clone <repository_url> it clones only the README file from the main branch.

How can I get a clone from another branch?


Solution

  • try this: git clone -b netflix-gpt-poc <repository_url>