I am working on my forked repo with 2 main branches:
I want the above branches to pull from the respective related repos; however, I want them to push to origin/<branch>
(master or bootstrap). I know I can designate a push by git push <remote> <branch>
, but I want it to be simpler, if possible.
As a follow-up, would tracking a branch help in anyway? I am not aware of tracking, although I did read about it via similar SO questions. How would branch tracking affect my situation?
You can set a different push
url by using the --push
argument to git remote set-url
. E.g.:
git remote set-url --push git@github.com:someuser/somerepo
For more documentation, see git help remote
.