0

I need libvlc 2.0.6 but when I clone the link bellow and compile I get libvlc-3.0.0-2.1.2.aar.

Is it possible to target a specific version when cloning git ?

git url: https://code.videolan.org/videolan/vlc-android.git

RonTLV
  • 2,376
  • 2
  • 24
  • 38

2 Answers2

1

You've got tags that are made for that. Just check out the one you want. I see that there's one for the version you want.

git checkout 2.0.6

Philippe
  • 28,207
  • 6
  • 54
  • 78
1

The normal way to do things is to clone the whole repository (which gets you the entirety of history -- all versions, all tags, etc) and then check out the specific version you want afterwards:

git clone https://code.videolan.org/videolan/vlc-android.git
cd vlc-android
git checkout 2.0.6

You can also tell clone to check out a specific version as it works; note that this still copies all of history down from the server:

git clone -b 2.0.6 https://code.videolan.org/videolan/vlc-android.git

You can also create a shallow clone, which doesn't copy down the rest of history, and only gets the specific version you want:

git clone -b 2.0.6 --depth 2 https://code.videolan.org/videolan/vlc-android.git

"depth 2" separates the changes in the commit tagged as 2.0.6 itself from those made prior; one could use "depth 1" if that weren't important.

Charles Duffy
  • 280,126
  • 43
  • 390
  • 441