Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Denton-L opened this issue May 31, 2019 · 1 comment

Comments

@Denton-L
Copy link
Member

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...

@Denton-L
Copy link
Member Author

Probably too obscure to be worth a command-line option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant