Branch by abstraction puts an interface in front of the old implementation, adds the new one beside it, and switches between them (often with a feature flag). The rewrite is merged to the main branch in small steps instead of living on a long branch.