Skip to content

Instantly share code, notes, and snippets.

@introt
Created May 29, 2021 18:18
Show Gist options
  • Save introt/11cd558c953fed19538681d9ddd0263c to your computer and use it in GitHub Desktop.
Save introt/11cd558c953fed19538681d9ddd0263c to your computer and use it in GitHub Desktop.
git: fetching someone else's branch, basing a new branch on it & cherry-picking commits across all branches
# assumptions: origin == our repo/fork && being inside it
git remote add TheirUsername git@github.com:TheirUsername/repo-name.git
git fetch TheirUsername
git checkout -b our-new-branch TheirUsername/their-branch
git cherry-pick commit-hash
git push origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment