It's simple to git cherry-pick other commits from other branches, all while maintaining a clean git blame history.
If I'm UserA
working on branch-A
, and then I know in an experimental branch-B
, UserB
and UserC
had been hacking away over the course of hundreds of commits on FunctionC
that I want to pull in. There are way too many commits to apply, and all those commits might have other changes I don't want to pull in.
Whats the most idiomatic way I can pull in FunctionC
in a way that preserves the history that went into it?
I've been searching for quite awhile, but in the case the changes I want weren't cleanly available in a few commits, it didn't seem like there was a way. All other methods seem to lose track of history.
In the meantime I've just been basically doing the equivalent of copy/pasting via git checkout --patch branch-B
but it leaves no sense of the activity that went into it, or whom to check the git blame for it, other than UserA.