[fpc-other] GIT versioning server on Raspberry Pi?

Bo Berglund bo.berglund at gmail.com
Fri Jun 2 23:33:37 CEST 2017


On Fri, 2 Jun 2017 10:19:49 +0100, Graeme Geldenhuys
<mailinglists at geldenhuys.co.uk> wrote:

>On 2017-06-02 00:00, Bo Berglund wrote:
>> The beauty of this is that we do not need to duplicate common
>> functionality between projects as would be the case if we *copied* the
>> common files into the source folder. These files are used in many
>> places but versioned in a single place on the server.
>
>Yes, Git has that functionality too. It is called "submodules". Common 
>code can live and be maintained in it's own repository. Other 
>repositories can than link to that repository.
>
>   https://git-scm.com/book/en/v2/Git-Tools-Submodules
>
>   https://git-scm.com/docs/git-submodule
>
>I have used this often. If you clone a repository that makes use of 
>submodules, all the information is already there (stored inside the 
>repository).
>
>The first time you clone such a repository, it will not automatically 
>fetch the files from the submodule. You need to run (only once) the 'git 
>submodule init' command. Then every time you want to update the 
>"common/shared code" you run 'git submodule update'.
>
>The Pro Git chapter explains it very well, and it is actually quite 
>simple to setup and use.

Thanks a lot, found the chapter and will be going over it this
week-end with my son-in-law who uses GIT himself.
He did not know of the possibilities before, though. He recently
converted his SVN repo to GIT. But I think he has not used this
feature.
He also earlier told me to look at GIT as replacement for CVS.

-- 
Bo Berglund
Developer in Sweden



More information about the fpc-other mailing list