I've never used PhpStorm before, but assuming that it can detect git changes that you make from the command line (like creating new local and remote branches), then you can do all of the things you want to do exclusively using git from the command line:
git checkout -b copy-of-master
git push -u origin HEAD
This will create a local branch copy-of-master
based off of master
, and set it to automatically track its remote version origin/copy-of-master
.
Documentation
checkout -b
: "Specifying-b
causes a new branch to be created as if git-branch(1) were called and then checked out."push [-u|--set-upstream]
: "For every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull(1) and other commands. For more information, seebranch.<name>.merge
in git-config(1)."