Skip to main content

PhpStorm protected branches feature

Published on

Recently, while working on a little project, I decided to clean up some of the commits on the master branch before pushing it to Packagist. To be lazy, I decided to use PhpStorm's interactive rebase tool instead of the good ole command line.

BUT I COULD NOT! And I started to go mad.

It turns out, PhpStorm has a protected branch feature. This stops you from doing silly things on a branch with the VCS capabilities you have available. When I removed master from these settings, I could reword and rebase to my delight.

I still highly recommend configuring this in your repository settings on Bitbucket, GitLab, GitHub, etc. But it is still a neat (and unknown to myself) feature.

I'm available for one-on-one consulting calls – click here to book a meeting with me 🗓️