Is there a way to clone a particular branch on git ?
已回答
Currently I'm using GitCheckoutProvider.clone() which allows me to clone to a folder using a git url and then I switch to a particular branch.
Is there a way to do clone directly to a branch like below.
git clone https://github.com/encryptorcode/pluralise.git -b VERSION_0_1
请先登录再写评论。
Unfortunately, there is no such possibility. The method, which is finally dealing with git is GitImpl.clone, but there is no possibility to pass extra parameters to it.
You can try using it directly and register a listener get notified about the end of cloning operation and simply switch the branch.