I am not a user of GIT so I know very little except when one clones a repository one gets ALL of the total history downloaded and that will be HUGE!
1. $ git clone -b lazarus_2_0_12 https://gitlab.com/freepascal.org/lazarus/lazarus.git laz2012
2. $ git clone -b release_3_2_0 https://gitlab.com/freepascal.org/fpc/source.git fpc320
This only downloads the specified branch. Simples :)
AFAICU svn is capable of getting sources from GIT provided opne has the correct URL and this is what I have tried many hours now to find in vain....I am not aware of this (but neither do I know that it is not so). But GitHUB offers svn access. And there are official mirrors on GitHub: https://github.com/fpc
With GIT
- view all branches (without needing to download the repo)
git ls-remote https://gitlab.com/freepascal.org/lazarus/lazarus.git
Just browse the gitlab page to the fpc source repository page. Copy the url from the "clone" button.
git init is only to use if you want a new repository of your own. https://git-scm.com/docs/git-init
If you want to work on a 'normal' git repository you have to use clone first (NOT init). After this you can switch to the branch or tag you want.
Earlier in the thread you have used the clone command and after this you can switch with 'git branch lazarus_2_0_12 origin/lazarus_2_0_12' and followed by a "git checkout lazarus_2_0_12"
1. $ git clone -b lazarus_2_0_12 https://gitlab.com/freepascal.org/lazarus/lazarus.git laz2012
2. $ git clone -b release_3_2_0 https://gitlab.com/freepascal.org/fpc/source.git fpc320
This only downloads the specified branch. Simples :)
So how do you find the tag names you used in the commands above?
Depending on your need, maybe you don't need to use git at all ? gitlab will allow you to download a zip file of whatever branch/tag you nominate. Its a reasonably quick 50meg download. If you are not planning to generate pull requests or update daily, I suggest its a lot easier.
You just use the gitlab webpage, navigate to Lazarus, select the tag/branch you want from left hand side, click the download button, second rightmost button. No knowledge of git required, no install of git required, no history.