GitHub forked repositories can be updated from GitHub UI or terminal.
To update from GitHub UI, you can create a "Pull Request" from the original repository to yours.
For updating using the terminal, add the original repo as a remote upstream to sync from.
Note: GitHub changed the default branch name from
mastertomainin 2020. The commands below usemain, but older repositories may still usemaster. Check your repo's default branch withgit branch -a.
bash
# check that there is no remote upstream repo and add one
git remote -v
git remote add upstream https://github.com/OriginalOrgOrUser/OriginalRepo.git
# verify that upstream has been added and fetch branches and commits from upstream
git remote -v
git fetch upstream
# checkout fork's main branch and do a merge of upstream/main into it
git checkout main
git merge upstream/main
# push the changes to update your fork
git pushKeep reading
Copy from a Protected Google Sheet/Doc
Google Docs/Sheets give users ability to 'lock' their content. This makes files viewable but no editing or copying will work. Here is how to copy from a protected Google Sheet/Doc.
·2 min read
