You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
987 B
987 B
title | aliases | categories | tags | date | ||
---|---|---|---|---|---|---|
Keep up-to-date on forked repositories | /posts/2020-11-14-keep-up-to-date-on-forked-repositories |
|
|
2020-11-14T23:20:16+01:00 |
I usually fetch the upstream repository and merge it into my local repository, then upload all the merges into the github repository. That works sometimes, but it also fails sometimes with me having an extra commit with merges leaving the git history different from the upstream...
This snippet has been taken from github.community.
$ git checkout master # Make sure you always run the following commands from the master branch
$ git fetch --all
$ git pull --rebase upstream master
$ git push origin master
This will rebase the upstream changes on your local forked version so the master branch git history will look exactly the same at the end.