Revert "Removed rebase functionality"

This reverts commit c1276d26da6d117130fc2e4c9e4fd8a305593dfe.