Last active
September 2, 2016 15:59
-
-
Save motss/3176a53cb46a7cd6be5780a8b8d44b4b to your computer and use it in GitHub Desktop.
git-fetch-merge-upstream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://help.github.com/articles/configuring-a-remote-for-a-fork/ | |
// https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches | |
// List current configured remote repo for your fork. | |
git remote -v | |
// Specify a new remote upstream repo. | |
git remote add upstream <GITHUB_REPO_URL> | |
// https://help.github.com/articles/syncing-a-fork/ | |
// Fetch branches and their respective commits from the upstream repo. | |
git fetch upstream | |
// Check out fork's local master branch. | |
git checkout master | |
// Merge changes from `upstream/master` into local `master` branch. | |
git merge upstream/master | |
// Push to fork with latest sync. | |
git push -u origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment