Update the fork Github

git, github

Solution

Add the original repo as a second remote to your local repo:

git remote add parentrepo <url>

Fetch all branches from it:

git fetch parentrepo

Given what you have said, `git branch -a` should give (assuming you have `origin` as the alias for your fork as it is by default when you clone)

* master
origin/master
origin/a
origin/b
parentrepo/a
parentrepo/b
parentrepo/c
parentrepo/d
parentrepo/e

You can branch any remote branch from parentrepo locally as you would for origin, and/or push them directly to origin.

Problem

I have forked a remote repo and it has 3 branches - master - a - b But the team added new branches to the remote. And the current branches are - master - a - b - c - d - e but my fork has only 3 branches. How should I update my fork to contain all the branches (including newly added branches) present in remote repo.

Original source

Related problems