Change default remote name #8830

Closed
opened 2025-11-02 08:20:08 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @jenspots on GitHub (Apr 14, 2022).

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

Originally created by @jenspots on GitHub (Apr 14, 2022). ### 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](https://docs.gitea.io/en-us/config-cheat-sheet/#repository-repository) 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_
GiteaMirror added the type/featuretype/proposal labels 2025-11-02 08:20:08 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8830