How to keep track of recently pushed branch

Hello,

I'm wondering how can i push a local branch to a new branch (not the origin) and keep track of this link for the next pushes in the future.

For example:
I have my principal branch : master.
I checked out a new local branch from master that i named master_new_feature.
After finishing my modifs, i commit then push that branch. However i want to push to a new branch other than push directly to master.
So i choose the option "Push to alternative branch" and name my new remote branch as its local name: master_new_feature.
The question is, if i continue to work with my local branch, the next time i push, phpstorm propose always master as origin thoughout i pushed a new branch to remote server.
Is there a config i have to do in order to tell phpstorm to memorise that now master_new_feature -> master_new_feature

Thans in advance

4 comments

Hello ;

You must first checkout master, then create a new branch, then do your modifications, then push. When you'll push, a dialog will be show, which allow you to specify where to push (at bottom of the dialog).

0

Thank you for your answer,

This is a normal behaviour of phpstorm and what i want to change is that i don't want to specify each time the place to push, i want phpstorm to memorise the remote track of the last push so the next time i push, the commits go directly to the remote branch that i pushed before. (I worked on Zend Studio before, and by configuring the Upstream config, iwas be able to tell Zend to do that)

0

Re ;

f you are following the steps which I've described, it's done automatically.

0

Indeed, I see the difference.
Thank you very much,

0

Please sign in to leave a comment.