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 '//git.pridedallas.com/git-repos/intranet.git'

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

5 comments
Comment actions Permalink

Hello,

Please vote for request <https://youtrack.jetbrains.com/issue/IDEA-141848> in order to move it up in the queue and receive notifications regarding further status changes.

0
Comment actions Permalink

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.

 

0
Comment actions Permalink

Keith,

> 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:
http://stackoverflow.com/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git

0
Comment actions Permalink

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.

0

Please sign in to leave a comment.