Scud Scud - 4 months ago 32
Git Question

How to clone a specific Git branch?

Git clone will behave copying remote current working branch into local.

Is there any way to clone a specific branch by myself without switching branches on remote repository?

git init
git remote add -t refspec remotename host:/dir.git
git fetch

But IIRC, by default clone fetches all branches from remote, not current working branch.