Created
January 21, 2021 18:57
-
-
Save rajbos/6d0f3206bdc6d5872f4b4960a93a2b3a to your computer and use it in GitHub Desktop.
Update repo from upstream
This file contains hidden or 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
# clone the forked repo | |
git clone https://github.com/rajbos/a-forked-repo.git | |
# make sure you are inside the git repo | |
cd a-forked-repo | |
# add the parent repo as a remote | |
git remote add github-parent $parentUrl | |
# fetch the changes from the parent | |
git fetch github-parent | |
# make sure you are on the right branch | |
git checkout main | |
# merge in any changes from the branch | |
git merge github-parent/main | |
# push the changes back to your repo | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment