On Fri, 2 Jun 2017 10:19:49 +0100, Graeme Geldenhuys <mailingli...@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 _______________________________________________ fpc-other maillist - fpc-other@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other