Skip to content

Allow for creation of remote branch whose name does not match local branch #3618

@socketbox

Description

@socketbox

Is your feature request related to a problem? Please describe.
Let's say that I've created a local branch and committed to it. When I go to push to the remote for the first time, I have a change of mind and want to give the remote branch (perhaps the work has changed in scope) a different name.

When I do that now, I receive the following error:

Error
error: src refspec <desired remote branch name> does not match any
error: failed to push some refs to <remote .git URI>

Describe the solution you'd like
I'd like to be presented with the option of creating the remote branch with the desired name.

Describe alternatives you've considered

  1. Not fulfilling this feature request but correcting the error text (which seems truncated--or perhaps this is git)
  2. Rephrasing the error text such that it's more intelligible.
  3. Telling the user to first rename the local branch and then attempt the push

Additional context
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions