2014-10-29 69 views
0

我有一個遠程倉庫中到位桶託管,但是當我想克隆這個存儲庫,以我的電腦
到位桶克隆主分支 我想克隆在同一個遠程託管過另一支叫static_pages_exercises項目。那可能嗎。如何克隆在到位桶特定分支

Error:it clones the remote master branch no the remote static-pages-exercises branch 


daniel:~/workspace$ mkdir sample_app 
daniel:~/workspace$ git init . 
Reinitialized existing Git repository in /home/fernando/workspace/.git/ 
[email protected]:~/workspace$ git clone [email protected]:ferbad1212/sample_app.git 
Cloning into 'sample_app'... 
remote: Counting objects: 139, done. 
remote: Compressing objects: 100% (124/124), done. 
remote: Total 139 (delta 42), reused 0 (delta 0) 
Receiving objects: 100% (139/139), 23.05 KiB, done. 
Resolving deltas: 100% (42/42), done 
+1

可能重複](http://stackoverflow.com/questions/1911109/clone-a-specific-git-branch) – 2014-10-29 00:40:49

+0

加'-b static-pages-exercises' – 2014-10-29 00:43:45

+0

感謝朋友。有沒有辦法克隆所有遠程分支機構? – user3678471 2014-10-29 00:50:43

回答

0

嘗試以下命令

GIT中克隆--branch BRANCHNAME cloneUrl

例如

GIT中克隆--branch功能的[克隆一個特定GIT中分支