Git Push - No Warning For No Matching Remote Branch

Why does PHPStorm allow me to push to a remote branch that does not exist on the remote? From the command line, that is not allowed by default:


C:\inetpub\Intranet_Local>git push origin 84617_ExcludedBA714
error: src refspec 84617_ExcludedBA714 does not match any.
error: failed to push some refs to '//'

Because PHPStorm allows this, I forget and at times push branches that should not exist in the remote.



Please vote for request <> in order to move it up in the queue and receive notifications regarding further status changes.


I just did, but that is not sufficient IMO. GitExtensions prominently displays the branch and other info, but I still forget and do this. However, GitExtensions responds similarly to the Git actually responds - the operation is stopped, a message is displayed that I am pushing a branch that is new to the remote and asks me to confirm if I want to proceed.




> From the command line, that is not allowed by default
Isn't it? I've just tried (the same setup, git under Windows) - it has just created the branch on the remote.

I think the message you see means something different:


Yea, you're right. I had a typo in the branch name. I guess that is something that GitExtensions added. PHPStorm is just plain dangerous in this area (this is not the only issue we have), so that we do all of our UI G work in GE instead. If PHPStorm would add features like this, we would not have to switch so much.


Please sign in to leave a comment.