First part of rebase