Skip to content

Change default remote name #19403

@jenspots

Description

@jenspots

Feature Description

When a new repository is created using the web interface, instructions are given to push a new or existing repository from the command line.

git remote add origin <server>/<repo>.git
git push -u origin main

This is great, but I often find myself wanting to push repositories for which origin is already defined.

error: remote origin already exists.

Perhaps it would be benificial to be able to change the default remote name, either on repository, user or global level, so these conflicts are unlikely to exists. Just like default branch names can be set. The obvious result in the web interface would be the following.

git remote add <default_remote_name> <server>/<repo>.git
git push -u <default_remote_name> main

This is one of those really minor issues that would enhance the user experience in my opinion. Apologies if this feature has been requested or exists, but I couldn't find it anywhere. I'd gladly implement this feature, by the way. :)

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/featureCompletely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions