- we have a
master - we have a feature branch
feat-xyz - we do a bugfix on branch
bug-abcbut branched fromfeat-xyzinstead of master and want to rebase our bugfix branch to contain only commits from master + our bugfix branch
$ (bug-abc) git rebase --onto master feat-xyz