remove and recreate branches