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
. Eg:
git remote set-url --push git@github.com:someuser/somerepo
For more documentation, see git help remote
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.