Example: I have a local branch called mybranch
I want it to fetch from one remote branch: remoteToFetch/branchToFetch
And I want it to push to another remote branch: remoteToPush/branchToPush
So when I do git fetch
and git push
(on that branch mybranch
), it fetches and pushes from and to that different references, by default.
remoteToFetch/ remoteToPush/
branchToFetch branchToPush
\ /
\ /
git fetch git push
\ /
\ /
mybranch
Is there a way to do that?
OBS:
I know this solution, but it seems to change all default pushes to one remote only, which is not what I want.