简体   繁体   中英

git clone a specific release from a forked git branch

I want to clone a specific version of a forked git repository, but seem to be misunderstanding why I am getting what I am getting.
I want to pull v2.43.0 from https://github.com/giggls/openstreetmap-carto-de ,

1.) which in theory should also have "hstore-only.style" (but does not if you click on v2.43.0). It seems to have it only under master. Why is that?

2.) If I do

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

This gives me the master, and I see all files including "hstore-only.style"

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

this already gives me v2.9.1, which is confusing. Because there the highest tag is 2.43.0. Where does the 2.9 come from?

3.) and with

$ git checkout v2.43.0

I would get the reduced file set without hstore-only.style .
Is there a way I can get the 2.43 with that file?

I want to pull v2.43.0 from https://github.com/giggls/openstreetmap-carto-de ,

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

If the tag exists on the remote side (and it seems it does ), it will allow you to clone it locally.

You can add --depth 1 if you don't want the full history locally.

A git describe --all will give you v2.43.0

However, in that branch, there is no hstore-only.style .

If I clone the full repo and do:

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'

As you can see, that file was probably introduced in v2.44.0 and more, not yet in v2.43.0.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM