Suppose I have a branch widget
, which was made by branching off feature
and adding several commits about building the widget
.
I now want the widget to be available in master
, without the rest of the feature. Is there an automatic way to make a new version of widget
that just consists of master
plus the stuff about the widget?
Simply doing checking out widget
and doing git rebase master
doesn't work because that would bring all the other parts of the feature with it.
I can do git rebase --interactive master
but that requires manually identifying and deleting the non-widget related commits. Is there are command that I can give the three branch names to and have it do this automatically?