Reference: Syncing a fork - User Documentation
Created
April 3, 2016 04:38
-
-
Save jessesquires/96b11a061ea2ce046940cb8db1294beb to your computer and use it in GitHub Desktop.
Script for Syncing a Fork
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
# Assumes that the git repository has upstream and remote urls set | |
# Assumes that you've committed your work on your current branch | |
current_branch=$(git rev-parse --abbrev-ref HEAD) | |
git fetch upstream | |
git checkout master | |
git merge upstream/master | |
git push # origin | |
git checkout $current_branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment