Last active
March 1, 2019 15:57
-
-
Save spencermountain/5c3852a695cba86d8a6aabf55aff8b82 to your computer and use it in GitHub Desktop.
Keeping a fork up-to-date
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
#add this function to ~/.bashrc or ~/.bash_profile | |
# each time you clone a fork, add the original as 'upstream' | |
# git remote add upstream git://github.com/REPO_ORG/REPO_NAME.git | |
# (thanks https://gist.github.com/CristinaSolana/1885435) | |
# keeps a fork up-to-date from the main repo | |
function update-fork() { | |
git fetch upstream | |
git pull upstream master | |
git push | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment