Skip to content

Instantly share code, notes, and snippets.

@RomuloOliveira
Created July 8, 2015 16:28
Show Gist options
  • Save RomuloOliveira/8baccb75ced206417a0f to your computer and use it in GitHub Desktop.
Save RomuloOliveira/8baccb75ced206417a0f to your computer and use it in GitHub Desktop.
Prepare a branch from another repository to merge into yours
# This assumes "origin" is your repo and "upstream" the other repo
git fetch upstream
git checkout upstream/<branch_name>
git checkout -b <your_branch_name>
git rebase master # or merge, if you prefer
git push --set-upstream origin <your_branch_name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment