git with several related Delphi projects

git with several related Delphi projects

We've got a large Delphi project that is mostly in one folder. But it has custom components in several other folders above the main folder, and it has several maintenance apps in different peer folders to the main folder, as well as another folder with files that are common to all of them.

I'm not very familiar with git, and I'm wondering what the best way to track things would be in this situation.

Do we need to track individual folders? Or can we track the main folder for a given project and all other folders that have files that contribute to it?

Comments

  1. As Vincent Parrett points, have a root for you repo, there put every single subproject in their own folder, keep 3th party code/components outside your repo (make a note on requirements on your readme.md) then upload the root folder to your git repo.

    Why to keep 3th party outside your repo? because you may not have rights to distribute them, and if author makes changes you will need to get them again and upload again... a pain in the bottoms!

    ReplyDelete
  2. My reason for "Why to keep 3rh party outside your repo?" is that the external components are used by *multiple* programs but the Delphi IDE allows only *a single* global installation of a specific component package.

    At this point a question arise - how to keep the project source and 3rd party lib in sync? I have a "ExternalUnitsBackup" sub folder inside the project root folder, so every time the external units are updated I manually sync the changes to the project root folder and commit to the svn server.

    ReplyDelete
  3. You MUST keep your external dependencies (in their own repos or submodules.) This is needed for both commercial/closed products and open source projects.

    You already do take caution before upgrading your commercial components in your production code, do you? I assume you have a task named "upgrade AwesomeComponentXX to new version". In that very same task you take some time to update your local backup.

    In this regard, submodules are handy because you can tag the whole repo and everything is in-sync. Different repos are easier but you must take care to tag everything so you have all your dependencies for a specific release at hand.

    ReplyDelete

Post a Comment