Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
"git rebase --onto" — used to rebase only latest (or several latest) commits onto a new branch
# This is just a note to self
git rebase --onto <base-branch> <current-branch>~ <current-branch>
# e.g. git rebase --onto master feature/something~ feature/something
# it's important here to use branch name and not other commit id.
# Can't use "HEAD" instead of "feature/something" ¯\_(ツ)_/¯
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment