@giuseppemastrodonato Your "mother" repository should be added as an upstream remote, so you can pull changes into each "child" repository:
git pull upstream master
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello guys, I developed a CMS based on Laravel and I wonder what is the best way to reuse the system for further projects.
Going straight to the point, I created a repository "CMS" which I clone everytime I want to create a new project with the CMS. Then, I create the website adding the template files and the (eventual) customizations to Models/Controllers.
Now, when I make some improvements to the mother repository "CMS", what is the best way to reflect the changes to the other websites?
What is the best practice, using GIT, to handle this flow? Forking the initial repository?
Looking forward to hear your feedbacks!
@giuseppemastrodonato You should be forking the parent repository, otherwise the child repository wouldn't have any common ancestor commits, and will probably give you a nasty merge conflict if you tried to pull the master branch of the parent repository into your child repository.
But, it's difficulties like this why a lot of content management systems have gone down the package route, in that the CMS is a package you install using Composer into a new or existing Laravel application, and then updating is a case of running
composer update your/cms rather than trying to keep multiple Git repositories in sync with an upstream one.
Please or to participate in this conversation.