Replaying a set of changes on a specific branch
Take the
extension
branch, figure out where it diverged from thebase
branch, and replay these patches in theextension branch
as if it was based off thesomewhere
branch instead.
With a history like this,
running
would result in:
NB: if the rebase of extension
on base
would not result in any commit (extension
and base
pointing to the same commit), no commits will be added onto somewhere
.
Say a fix has been developed on the branch fix
, and that the changes have been incorporated in the master
branch in some manner (merge, cherry-pick, etc). Now we want to backport the fix to a previous point in the history, v1
.
In this case, running
will only move fix
to v1
.
The changes in c4
will not be replayed on top of c1
, because replaying fix
on master
would not include c4
, since it's already part of master
.
Source:
Last updated