Skip to content

Instantly share code, notes, and snippets.

@shi-yan
Forked from giosakti/gist:3027026
Last active January 14, 2017 21:46
Show Gist options
  • Save shi-yan/6fa8aeea3d04f1b149f46ff725408d28 to your computer and use it in GitHub Desktop.
Save shi-yan/6fa8aeea3d04f1b149f46ff725408d28 to your computer and use it in GitHub Desktop.
[Git] Fetch & merge upstream/downstream repo
downstream github
git remote add <upstream>/<repo> ssh://git@bitbucket.org/<upstream>/<repo>.git
git fetch <upstream>/<repo>
git checkout master
git merge remotes/<upstream>/<repo>/master
sync submodules
git submodule update --init --recursive
resync submodules
git submodule foreach git pull origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment