Created
April 5, 2014 03:25
-
-
Save JesseHerrick/9987105 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
git remote add upstream $1 | |
git pull origin HEAD # make sure it's recent | |
git fetch upstream HEAD # fetch origin's fork changes | |
git merge upstream/HEAD &>/dev/null || git rebase upstream/master # apply changes | |
git rebase HEAD # keep HEAD at the top | |
git push origin HEAD # push changes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment