Git使用問題 - Linux
By Caitlin
at 2010-01-22T13:52
at 2010-01-22T13:52
Table of Contents
※ 引述《final01 (牛頓運動定律)》之銘言:
: 想請問一下例如:http://gitorious.org/usb/usb
: 有很多branch
: 要怎麼下載裏面的branch呢??
: 我想要用git下載(這網頁好像可以幫你打包)
: 感覺git未免太複雜了吧
: 感謝!!
git clone 就會把所有的 commit 給弄下來
然後你再用 git branch -a 看一下
然後 git branch <local_branch_name> origin/<remote_branch_name>
這樣你就可以有你要的 branch 了
Ex: 我想玩看看 Ubuntu Karmic EC2 kernel
# git clone git://kernel.ubuntu.com/ubuntu/ubuntu-karmic.git
.....
# cd ubuntu-karmic
# git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/arm
remotes/origin/ec2
remotes/origin/fsl-imx51
remotes/origin/master
remotes/origin/mvl-dove
remotes/origin/netbook
remotes/origin/patches-that-need-love
remotes/origin/pending-upstream-patches
# git branch my_ec2 origin/ec2
Branch my_ec2 set up to track remote branch ec2 from origin.
# git checkout my_ec2
Switched to branch 'my_ec2'
要注意的是, 接下來你如果想 rebase 的話, 請下
git fetch origin
git rebase origin/ec2 <- 不是用習慣的 origin/master
--
: 想請問一下例如:http://gitorious.org/usb/usb
: 有很多branch
: 要怎麼下載裏面的branch呢??
: 我想要用git下載(這網頁好像可以幫你打包)
: 感覺git未免太複雜了吧
: 感謝!!
git clone 就會把所有的 commit 給弄下來
然後你再用 git branch -a 看一下
然後 git branch <local_branch_name> origin/<remote_branch_name>
這樣你就可以有你要的 branch 了
Ex: 我想玩看看 Ubuntu Karmic EC2 kernel
# git clone git://kernel.ubuntu.com/ubuntu/ubuntu-karmic.git
.....
# cd ubuntu-karmic
# git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/arm
remotes/origin/ec2
remotes/origin/fsl-imx51
remotes/origin/master
remotes/origin/mvl-dove
remotes/origin/netbook
remotes/origin/patches-that-need-love
remotes/origin/pending-upstream-patches
# git branch my_ec2 origin/ec2
Branch my_ec2 set up to track remote branch ec2 from origin.
# git checkout my_ec2
Switched to branch 'my_ec2'
要注意的是, 接下來你如果想 rebase 的話, 請下
git fetch origin
git rebase origin/ec2 <- 不是用習慣的 origin/master
--
Tags:
Linux
All Comments
By Ina
at 2010-01-23T05:56
at 2010-01-23T05:56
Related Posts
Git使用問題
By Annie
at 2010-01-22T13:19
at 2010-01-22T13:19
在linux玩 Enemy Territory
By Jacky
at 2010-01-22T13:05
at 2010-01-22T13:05
字串的分解
By Sarah
at 2010-01-22T12:53
at 2010-01-22T12:53
64 or 32 位元?
By Elvira
at 2010-01-22T12:32
at 2010-01-22T12:32
64 or 32 位元?
By Quanna
at 2010-01-22T11:18
at 2010-01-22T11:18