Hacker News new | ask | show | jobs
by ethomson 4161 days ago
In a nutshell, it checks out the target and cherry-picks what had been HEAD onto it, beginning at the merge-base.

https://github.com/libgit2/libgit2/blob/master/src/rebase.c may be helpful and (hopefully) readable.