I wish to use git with multiple remote repos. I have my central git server (aka origin
), as well as my local dev machine. What I am trying to do is pull down the latest linux kernel from kernel.org's git repo. I will then make a few changes, and then push the whole modified repo up to my own git server.
I have managed to do this ok (by just doing git remote add a couple of times - ones for the origin and once for kernel.org). However, if I clone origin from scratch, I am unable to see kernel.org as a remote.
Is there a way to push the remote add
commands? Or is it that everytime I wish to pull in changes from kernel.org (on a new machine), do I have to manually add it?
Also, when I create my local branch, I made it track a remote branch from kernel.org. Since I can't see kernel.org as a remote on a fresh clone, does this mean that this branch isn't tracking kernel.org anymore?
git push origin --mirror
will push all local refs to origin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With