Created
October 16, 2019 13:03
-
-
Save gmmorris/dc688bfd0f8e03fe7c5ffabfec4fb2cb to your computer and use it in GitHub Desktop.
Refresh Fork's master branch from upstream and merge into the current branch
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
branch_name="$(git symbolic-ref HEAD 2>/dev/null)" || | |
branch_name="(unnamed branch)" # detached HEAD | |
branch_name=${branch_name##refs/heads/} | |
git checkout master | |
git fetch upstream | |
git merge upstream/master | |
git checkout $branch_name | |
git merge master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment