Created
July 19, 2020 07:55
-
-
Save Richienb/8021a39b217f3a68120e1bb1c2a30819 to your computer and use it in GitHub Desktop.
Synchronise the current branch of a fork with the upstream repository.
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
UPSTREAM_BRANCH=$1 | |
if [ -z "$UPSTREAM_BRANCH" ]; then | |
UPSTREAM_BRANCH=$(git branch --show-current) | |
fi | |
git fetch upstream && | |
git merge upstream/${UPSTREAM_BRANCH} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment