Sign in Join
Wiki copytemporary

FAQ SVN to GIT: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## Where is the new GIT repo
22
33- <https://gitlab.com/freepascal.org/fpc>
44- <https://gitlab.com/freepascal.org/lazarus>
55
66And a mirror (FPC and Lazarus) at
77
88- <https://github.com/fpc>
99
1010And for Lazarus
1111
1212- <https://sourceforge.net/p/lazarus/laz.git/ci/main/tree/>
1313
1414(As long as Sourceforge supports it)
1515
1616## Where can I get help to use GIT
1717
1818There are 2 pages to help moving from SVN to GIT. Each page is a full "SVN to GIT" overview. The pages are alternatives to each other. You should choose one and stick with that one.
1919
2020- [[FPC git]] (based on old/established "git checkout")
2121- [[SVN to GIT Cheatsheet]] (based on new "git switch")
2222
2323- <https://git-scm.com/docs> (the official Git help)
2424- [GIT Succinctly](https://www.syncfusion.com/succinctly-free-ebooks/git) - Free Ebook (PDF, MOBI, EPUB) from SyncFusion.
2525
2626### How can I get the (checkout/download) sources from GIT
2727
2828See the above pages.
2929
3030Install a git client (command line) and run
3131
32-`   git clone  `[`https://gitlab.com/freepascal.org/fpc/source.git`](https://gitlab.com/freepascal.org/fpc/source.git)`  my_local_dir`\
33-`   git clone  `[`https://gitlab.com/freepascal.org/lazarus/lazarus.git`](https://gitlab.com/freepascal.org/lazarus/lazarus.git)`  my_local_dir`
32+```text
33+ git clone https://gitlab.com/freepascal.org/fpc/source.git my_local_dir
34+ git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git my_local_dir
35+```
3436
3537After that (to update)
3638
37-`   git pull    `
39+```text
40+ git pull
41+```
3842
3943Then use (depending which guide you follow)
4044
41-`   git checkout main`\
42-`   git checkout fixes-2_2`\
43-`   git switch main`\
44-`   git switch fixes-2_2`
45+```text
46+ git checkout main
47+ git checkout fixes-2_2
48+ git switch main
49+ git switch fixes-2_2
50+```
4551
4652## Why did we move to GIT
4753
4854There are many reasons. Some of them were:
4955
5056- For those who make commits to the project, GIT offers a lot of useful feature.\
5157 That is: **Perceived as useful** by those who make the commits. And therefore helping the daily workflow of the team. (It doesn't matter, if those features are overall better or worse than SVN. They are better for those who work most with the repository)
5258 - Local branches, as quick temp storage (not svn shelves / that would be git stash)
5359 - This can be used as "savepoint" while working on a commit. (Saving a partial commit, in case one needs to roll back)
5460 - Storing an unfinished attempt on some idea
5561 - Easy switching between branches
5662 - **Syncing between different machines** (Laptop, Virtual machine) without needing an (external) server. This helps tremendously with testing for different platforms.
5763 - Working offline
5864 - Personal forks of the repo. For example to share a patch by publishing a branch (unfinished work / may still need to be completely redone) on your personal fork.
5965 - ... (I need to go through old mails to find the remaining reasons)
6066- Maintenance: Hosted solution (see "Why GitLab"). To the best of our knowledge there is no hosted SVN platform offering even half of what hosted GIT platform offer.\
6167 This includes the high maintenance cost of running Mantis
6268
6369Note that several team members have in the past already used "git svn" and similar solutions. Despite the downsides (e.g. git svn, is really slow to update), this means that the above points are not just hopeful assumptions. The listed "perceived git advantages" have already been experienced by those team members.
6470
6571On the long run, we may also be able to use the additional features offered by the hoster (that would have applied to GitHup or GitLab), such as CI integration. But that's to be seen in future.
6672
6773### Why GitLab
6874
6975Self hosting becomes more and more involved. Aside from the technical maintenance needs, the legal requirements are getting bigger and bigger. In order to protect our self, and save time we decided to use a hosted platform.
7076
7177- GitLab offers a very good deal to open source projects. Better than GitHub, at this time.
7278- GitLab is open source. If ever we need to self host again, we have the choice to keep the platform.
7379
7480### Why now
7581
7682The old server would have had to be replaced now. So we were at a point where we had to invest considerable time and effort in any way we could go. Given that the move to Git had been decided, there was no point to invest time into temporarily extending SVN.
7783
7884## What if I really can't switch to GIT
7985
8086We have mirrors at GitHub. And GitHub (currently) allows to access them with an svn client. (see the drop-down for the "clone url").
8187
8288However, this should be only used as a last resort. The teams do not have any plans to invest time into supporting this. It is there as long as GitHub offers it for free.
8389
8490Further, it is incompatible with the old svn. GitHub reverse translates it from git. So each revision gets a new arbitrary revision number. And those numbers can not be used to report/discuss issues. No one in the team uses this svn-mirror, so non of us has access to those revision numbers. To report issues you need the git sha1.
8591
8692---
8793*From the Free Pascal wiki, page "FAQ SVN to GIT", as it stood on 2022-01-13 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
8894Category: Version Control

Back to history