2 ms·
Here's some Python pseudocode of the mental model that works well enough most of the time? def rebase(base, curr=HEAD): common_ancestor = git_merge_bas
by nerdponx 3y ago
Here's some Python pseudocode of the mental model that works well enough most of the time?
def rebase(base, curr=HEAD):
common_ancestor = git_merge_base(base, curr)
git_checkout(common_ancestor)
for commit in commit_range(common_ancestor, curr):
git_cherry_pick(commit)
Does that help?