Last active
March 22, 2020 05:42
-
-
Save kena0ki/6fbeaf5442965e21227f059b93cf4ad8 to your computer and use it in GitHub Desktop.
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/en/github/getting-started-with-github/fork-a-repo | |
# https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork | |
FORKREPO="$1" | |
ORIGINREPO="$2" | |
WORKDIR="$3" | |
git clone "$FORKREPO" "$WORKDIR" # clone forked repo | |
cd "$WORKDIR" | |
git remote -v # confirm current configuration | |
git remote add upstream "$ORIGINREPO" # add upstream | |
git remote -v # confirm if upstream is added | |
git fetch upstream # update local repo | |
git checkout master # switches to branch 'master' | |
git merge upstream/master # merge from upstream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment