I have two remote repositories: a main repository and a fork, and want to pull new changes from the main repo and push to my fork so I can create pull-requests to the main repo.
I know it is posible to add both remotes using git remote add <name> <url>
but I don't want to explicitly do git pull <main_repo>
and git push <fork_repo>
git remote set-url --push origin <fork_repo>
After doing that you can check urls with this command
git remote -v
and you'll see something like
origin <main_repo> (fetch)
origin <fork_repo> (push)
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