Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Consistent tagging across multiple projects in separate Git repositories

I'm working on a product which relies on several different projects each hosted in its own Git repository. When a release is made, it would be ideal for us to consistently tag every project that is involved in building the product - this includes the core code, libraries and build tools. Is there an obvious and sensible way to tag all projects at once?

(It may be a distraction, or might be worth noting that each project is using Maven; perhaps there are plugins for managing this. If so, I've not found any.)

like image 228
Armand Avatar asked Apr 09 '10 13:04

Armand


People also ask

Should I have a repository for each project?

If your projects are independent, it's fine to keep them in separate repositories. If they share components, then put them together. Very good reasoning, this should be the top answer in my opinion.

Can you use the same tag twice in git?

Yes, it's a two-level annotated tag (there's no real limit to how long a tag chain can go, although to make crazy-long ones you'd want to use git mktag in a loop, rather than using git tag -a and then deleting the external refs).

Can we have multiple projects in one repository?

Yes. You can put multiple projects in one Git repository but they would need to be on different branches within that repo.

Can I have multiple projects in one repository Github?

Yes you can, but is not recommended. Best practice is one repo per project always. Otherwise you have multiple projects updating one repo, that can mess with the code a fair bit if not set correctly. If the project is set up to be read-only on one project, that is an exception.


1 Answers

The question is a bit broad (at least for me) in its current state but the Maven Release plugin might help to do things in a consistent way. Pay a special attention to the Prepare a Release example.

like image 62
Pascal Thivent Avatar answered Sep 25 '22 03:09

Pascal Thivent