How to update forked repo with changes from main repository?

Wed, Aug 19, 2020 One-minute read

First of all you have to add new remote in your cloned forked repo

git remote add <new_remote_name> <your_repo_url>

Next, you have to fetch changes from original repo:

git fetch <new_remote_name>

And finally you can sychronize new changes using f.g. rebase:

git rebase <new_remote_name>/<branch_you_want_to_synchronize>

Useful resource: How to update a forked repo with git rebase


Thank you for visiting my website. I hope you enjoyed content which I prepared and learned something valuable from it. If you want to be informed about my next entries or occasionally get a message with a collection of some interesting links, please subscribe to my newsletter. I will be extremely pleased if you do this and join my community!

  • By clicking button below you agree to send you news from my blog, about my products and services. Above data are stored in Mailchimp and I do not share them to anyone. More info you can find in privacy policy.