Ease your open source maintenance with
Git Subtree Split as a Service
Get started

Git Subtree Split as a Service

Subtree split takes the content of one repository and splits it into many smaller ones. This setup might be familiar from Symfony: all modifications go to the symfony/symfony repository then a subtree split service (like this) pushes the changes to the Symfony component repos, like symfony/event-dispatcher or symfony/framework-bundle. This makes it a lot easier to do changes in the Symfony project since one change probably effects more than one component.

Other examples of organizations using a subtree split are PHP-cache and PHP-translation.

When using this service you need to set up your master repository and configure what paths to split into other repositories, called slave repositories. The slaves should be considered as read only, thus you should NEVER push anything to them. After you configured your setup, we will create a web hook for the master repository and deploy keys for your slaves. Whenever you push something to the master we will split the content and push to the appropriate slaves.

Warning

Please read this carefully. The data in your slave repositories will be overwritten, all changes will be ignored and lost. If you setup is not configured correctly, you may lose data. We do think this is very serious and will help and guide you as much as we can. We cannot take any responsibility for lost data.

About

This service is developed by Tobias Nyholm. The service is using the git-subsplit script by Beau Simensen.

If you have any comments, questions or feedback feel free to send me a tweet @tobiasnyholm.

Changelog

FAQ

Why do I need to split my package into smaller packages?

It is considered bad package design when there are users interested in a specific feature and they have to install loads of other classes to get that feature. Say that you are interested in Symfony's option resolver. Then you want to download only classes related to the option resolver, you do not want the full stack framework.

It is the same idea with PHP-cache. Redis adapter, Memcache adapter, APC adpater are all in separate packages and repositories. But since maintaining lots of repositories are tricky we want to keep all the adapters in one repository and to a subtree split.

Matthias Noback has written a great book about package design. Read about it here.

What is a "master"?

A master repository is the repository you work with. Like symfony/symfony. All PRs and commits goes to that repo. From the master we do a "git subtree split" to your configured slaves.

What are "slaves"?

A slave repository is a read only repository. You use it to create smaller packages on packagist. Much like PHP-cache does. They have all their cache adapters in a separate package.

Are my access tokens and deploy keys secure?

One should always take security is very seriously. We store all sensitive data encrypted and the source code has been vetted for security vulnerabilities by trusted developers and by automated tools.

How is this different from Split.sh?

Split.sh is a great tool by Fabien Potencier. However, it is not a service. You need to run the commands yourself for every push. A service will help you register hooks and deploy keys and run the split command when needed.

The private version of Split.sh, that is used by Symfony core team, is awesome. It has a lot of features that this service never will compete with. (At least not in a near future.)

Will this service be open sourced?

I'm not sure to be honest. It feels scary to open source a service in which people put a lot of trust to and security breaches will be fatal. On the other hand, that is the reason why you should open source something.

The source is not open sourced at the moment.

Why is only GitHub supported?

Do you need anything else? Join us and we can try to support it together.

Can I get feature X?

Of course, lets talk about it and you are free to contribute.

This service is great. How do I give you all my money?

No need to. Just be kind and help others to do open source development.

I found an issue, what do I do?

Just send me a DM on twitter: @tobiasnyholm