TheRealPir TheRealPir - 4 years ago 157
Git Question

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,

1.) which in theory should also have "" (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://

This gives me the master, and I see all files including ""

$ 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

Is there a way I can get the 2.43 with that file?

Answer Source

I want to pull v2.43.0 from,

git clone --branch v2.43.0 --single-branch

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

If I clone the full repo and do:

C:\Users\vonc\prog\git\openstreetmap-carto-de>git log --full-history --oneline --decorate --
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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download