關於 github - Linux

Table of Contents

各位板友午安

github 在 linux 之下也常用,所以我就來這邊請教了

我在 github 上有創另一個 branch xxx, 但我整包拉下來的時候

git clone http://XXXXXXXXXXXXX ,打開資料夾,git branch

它只有 master 這個 branch,請問我要如何連同 master 將另一個 branch

也一起拉下來呢? 謝謝。

--

All Comments

Lauren avatarLauren2015-04-23
git checkout -b localbranchname origin/remotebranch
Aaliyah avatarAaliyah2015-04-27
git pull BRANCHNAME
阿錯了 一樓是對的:p
David avatarDavid2015-04-27
謝謝
Harry avatarHarry2015-04-29
若你希望長出來的 local-branch-name 跟 remote-branch-na
me 一樣,則 1F 的指令可用 "-t" 參數直接簡寫成 git chec
kout -t remote-name/branch-name
Joseph avatarJoseph2015-05-03
其實就checkout branch name就好了,若你本機沒有哪個branch
,就會自動抓遠端的那一份來本機
Kyle avatarKyle2015-05-07
8F ++,在下也都是直接 checkout 就有了!
Zenobia avatarZenobia2015-05-09
沒注意過 -t 這個 switch 聽起來挺好用的
Doris avatarDoris2015-05-11
你可以用git branch -r 看到遠端branch
Victoria avatarVictoria2015-05-15
BTW,這應該是 Git 的問題,而跟 GitHub 沒啥關係喔!