Matthias
11/11/2014

Automagically initialize all VCS roots for PHPStorm

PHPStorm has great version control support. However, if your project is composed of multiple VCS repositories, you will need to initialize them correctly to get all the benefits.Here's the script that will do this for you.

PHPStorm supports the use of multiple version control systems for different directories. If you setup all VCS roots correctly in the VCS settings dialog, it will transparently track, commit, diff etc. changes in an unified manner, picking the appropriate VCS and repo automatically.

However, setting up all those roots can be tedious – especially when you install dev -variants for a lot of libraries with composer. So, without further ado, here's a quick'n'dirty PHP script that will create the necessary XML configuration file for you.

Simply run it from your projects base directory as phpstorm-init-vcs-roots > .idea/vcs.xml .

About Matthias

Avatar von Matthias Pigulla

Matthias Pigulla

Diplom-Wirtschaftsinformatiker, Geschäftsführer

Der strategische Kopf hinter unseren Softwaresystemen behält bei der Entwicklung und Betreuung komplexer Architekturen den Überblick, kümmert sich um die technische Infrastruktur oder berichtet über seine Erfahrungen und Erkenntnisse auf der Symfony User Group. Und wenn er abends damit fertig ist, entspannt der zweifache Vater entweder auf seiner Yogamatte oder lässt beim Fotografieren die Seele baumeln.

Was this helpful for you? Let @webfactory or @mpdude_de know!

Wir suchen Symfony-Entwickler*innen!

To top