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.

Written by: Matthias
Published on: 2014-11-11

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 .

Sie möchten ein PHP-Projekt realisieren?

Als PHP Agentur haben wir langjährige Erfahrung in der Umsetzung von Softwareprojekten in PHP. Wenn Sie ein Projekt in PHP realisieren wollen und einen Partner suchen, sprechen Sie uns gerne an!

Did we spark your interest?

If so, we'd love to hear from you. Don't hesitate to get in touch with us, if you have any questions or further remarks. And if you want to discuss any type of project, product, problem or idea with us, we would like to even more!