Skip to content

Implement command-line options to change branch.<name>.remote/pushRemote configs #250

Closed
@Denton-L

Description

@Denton-L

Perhaps something like --set-remote-to, --set-push-remote-to, --set-remote-save-to-push?

For the last, this would behave similarly to f39a9c6 (remote: add --save-to-push option to git remote set-url, 2018-12-10).

That option is useful for a situation such as mirroring. Consider if I wanted to mirror an upstream branch on my own remote. I would have something such as

[branch "master"]
    remote = "upstream"
    pushRemote = "origin"

in my config.

We could make this efficient to setup by doing:

git checkout master # is currently tracking origin's master
git branch --set-remote-save-to-push upstream

This is already implemented here but I think this idea might be a little too stupid to contribute. Maybe I'll send it in one day...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions