January 5, 2020

Git Merge From Upstream Into Your Fork

Given you want to fork an existing repository e.g. serverless-stack to migrate it to a new language you still want to recieve the updates from the main repository.

Merge the upstream repository into your fork.

Go into your repository and checkout the branch you want to merge to

git checkout master

Pull the desired branch from the upstream repository. This method will retain the commit history without modification.

git pull https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git BRANCH_NAME

Then merge the changes with your tool of choice.

Impressum © 2019