I understand that I can use ‘git push -u [repo] [br]’ to make [repo] the default upstream for branch [br].
What I would like to do is set things up so that ‘git fetch’ fetches changes from one repo for a given branch, and ‘git push’ pushes changes to a different repo for that same branch.
So far reading the man pages and searching here hasn’t turned anything up.
The reason I would like to do this is because there is an open source project (not hosted on GitHub), and I have created a fork of it (on GitHub), and would like to by default pull from the open source project, and by default push to my private fork.
See
remote.<name>.pushurlin git config.remote.<name>.urlsets your push and fetch location, but if you also specifyremote.<name>.pushurl, then the former is used only for fetches and the latter for pushes.