Reputation: 669
is
git clone -b branch1 ssh://gitolite@host/project/testkit
equivalent to
git clone ssh://gitolite@host/project/testkit
cd testkit
git checkout branch1
?
Upvotes: 1
Views: 43
Reputation: 992767
Yes, this is supported by the git clone
documentation:
-b <name>
Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository’s HEAD, point to
<name>
branch instead. In a non-bare repository, this is the branch that will be checked out.
Upvotes: 1