Last active
June 28, 2021 05:15
-
-
Save tgrecojs/eb6f480b6f029a198e1aaac3df6b170c to your computer and use it in GitHub Desktop.
Instructions explained in eggheadio's video - https://egghead.io/lessons/javascript-how-to-fork-and-clone-a-github-repository.
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://egghead.io/lessons/javascript-how-to-fork-and-clone-a-github-repository | |
# Step 1 - Fork Repo want to work with & clone it to your machine. | |
git clone https://github.com/tgrecojs/example-repo | |
# cd into repo | |
cd example-repo | |
# Add upstream branch | |
git remote add upstream https://github.com/<repoOwner>/example-repo | |
# fetch upstream branches | |
git fetch upstream | |
# Point master branch of forked repo to the upstream repo's master branch | |
# ex. of upstream/main being the target branch we wish to stay in sync ith | |
git branch --set-upstream-to=upstream/main main | |
# ex. upstream/master is the target branch we wish to stay in sync ith | |
git branch --set-upstream-to=upstream/master master | |
## finally, sync repo from upstream branch | |
git pull upstream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment