Search code examples
gitgit-branchgit-bashtortoisegitgit-clone

Cloning a single branch from a git repo


I've tried several time to clone a single branch from a git repo provided by my Org. I tried with git bash , tortoise but every time when i try to clone a single branch it started cloning the whole repo. Is there any particular solution for that?


Solution

  • You can use this command to solve your issue. git clone --single-branch --branch <branchname> <remote-repo>