Load pull request (branch diff) files in PhpStorm

Stick this in your .bash_profile or .bashrc file:

function diffopen() {
git diff --name-only "$1" | xargs -d '\n' pstorm;
}

Then in your project folder, say you want to open all files that differ from your master branch:

diffopen master

Note, on OSX you’ll need the GNU version of xargs for this to work, as I discovered the hard way..

Leave a Reply

Your email address will not be published. Required fields are marked *