簡體   English   中英

git克隆分叉git分支的特定版本

[英]git clone a specific release from a forked git branch

我想克隆一個特定版本的分叉git存儲庫,但似乎誤解了為什么我得到了我得到的東西。
我想從https://github.com/giggls/openstreetmap-carto-de中提取v2.43.0,

1.)理論上也應該有“hstore-only.style”(但如果點擊v2.43.0則不會)。 它似乎只在主人之下。 這是為什么?

2.)如果我這樣做

$ git clone git://github.com/giggls/openstreetmap-carto-de.git

這給了我主人,我看到所有文件,包括“hstore-only.style”

$ cd openstreetmap-carto-de
$ git tag -l

這已經給了我v2.9.1,這令人困惑。 因為最高標簽是2.43.0。 2.9來自哪里?

3.)和

$ git checkout v2.43.0

我會在沒有hstore-only.style情況下獲得減少的文件集。
有沒有辦法用這個文件獲得2.43?

我想從https://github.com/giggls/openstreetmap-carto-de中提取v2.43.0,

git clone --branch v2.43.0 --single-branch https://github.com/giggls/openstreetmap-carto-de

如果標簽存在於遠程端(並且它似乎存在 ),它將允許您在本地克隆它。

如果您不想在本地使用完整歷史記錄,可以添加--depth 1

一個git describe --all會給你v2.43.0

但是,在該分支中,沒有hstore-only.style

如果我克隆完整的回購並執行:

C:\Users\vonc\prog\git\openstreetmap-carto-de>git log --full-history --oneline --decorate -- hstore-only.style
8a386af Merge tag 'v3.1.0'
cbbe151 Merge tag 'v3.0.1'
30e20a5 Merge tag 'v3.0.0'
d876fbb Merge tag 'v2.45.1'
7dcf103 Merge tag 'v2.45.0'
ad8bd4f Merge tag 'v2.44.1' from upstream
8ac3f86 Merge upstream tag 'v2.44.0'

如您所見,該文件可能是在v2.44.0及更高版本中引入的,尚未在v2.43.0中引入。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM