 [ ← blog / phpstorm ](/) Dec 12, 2018  ·  \#phpstorm  ·  1 min read 

# PhpStorm protected branches feature



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.

     ![](/sites/default/files/styles/large/public/Screen%20Shot%202018-12-12%20at%203.35.11%20PM.png?itok=PY0mkx8G) 

 

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.

     ![](/sites/default/files/styles/large/public/Screen%20Shot%202018-12-12%20at%203.33.21%20PM.png?itok=wNBTuVgQ) 

 

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.

 

  ![](/themes/custom/mglaman/images/headshot.webp)Thanks for reading

I write about Drupal, PHP, and the quiet infrastructure behind large sites — caching, config, and testing. New posts land every week or two.

 [Subscribe via RSS →](/rss.xml) [About me →](/about-me) 

 



 

  [← Older

Running Drupal's Nightwatch test suite on DDEV

 ](/blog/running-drupals-nightwatch-test-suite-ddev) [Newer →

Two Zero One Nine

 ](/blog/two-zero-one-nine)