Extract directory to a new repository