作者converse2006 (宮城)
看板LinuxDev
標題Re: [問題] Git使用問題
時間Tue May 4 19:18:06 2010
※ [本文轉錄自 Linux 看板]
作者: converse2006 (宮城) 看板: Linux
標題: Re: [問題] Git使用問題
時間: Tue May 4 18:05:52 2010
大家好 有個小問題想請教一下
爬文看到這篇
我的狀況是我要在
http://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=summary
抓取裡面之前的版本 ex v2.6.26-davinci
我先
git clone git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git
接著我在git branch -r查看的時候
converse@converse:~/DaVinci/linux-davinci$ git branch -r
origin/HEAD -> origin/master
origin/davinci-2.6.30
origin/davinci-fixes
origin/davinci-fixes-for-linus
origin/davinci-for-linus
origin/davinci-i2c
origin/davinci-mtd
origin/davinci-next
origin/davinci-orphaned
origin/davinci-upstream-accepted
origin/linus/master
origin/master
發現沒有我要的那個版本可選
還是其實有只是我不知道?
有沒有前輩可以指點一下
謝謝
※ 引述《Spig (Spig)》之銘言:
: ※ 引述《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
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.138.19.69
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.138.19.120
→ Anathema:有看tag嗎 05/04 21:05
→ converse2006:有,我有試著git checkout到我要的版本 但我不確定 05/04 23:19
→ converse2006:我是否有更新到我要的版本@@ 05/04 23:20