Skip to content

Instantly share code, notes, and snippets.

@victorlin
Created May 29, 2020 15:41
Show Gist options
  • Save victorlin/e27ff983748e7ae80cb4b9c626634d0f to your computer and use it in GitHub Desktop.
Save victorlin/e27ff983748e7ae80cb4b9c626634d0f to your computer and use it in GitHub Desktop.

A manual approach to git rebase that puts current branch commits over new commits in other branch.

git branch -m feature-branch tmp
git checkout dev
git checkout -b feature-branch
git cherry-pick <earliest-sha1>^...<latest-sha1>

git branch -D tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment