On Sun, Sep 5, 2010 at 15:54, [email protected] <[email protected]> wrote: > I am frequently in the situation where my local repo is tracking an > open source project repo, which I don't have write access to, and I > want to push to my public fork of the project repo (this way of doing > things is encouraged on sites like Github). So I want to pull from the > main project repo, which is why I set it to track that repo, but I > want to push to my own public repo. As it stands now, I have to keep > copying and pasting the (ssh) git URL of my public repo every time I > want to do that. Couldn't magit keep track of multiple upstreams?
magit aside, you probably want url.<base>.pushInsteadOf in your config. That's a built-in git feature for exactly this workflow. > P.S. Actually it's a little worse with key groups at the moment, > because the only way I've found to do it with the key groups branch of > magit is the long-winded C-u M-x magit-push, because C-u seems to have > no effect if a command is launched via key groups. Yeah I've noticed that. It's annoying when you want to push to a non-default remote. I didn't know about that workaround though.
