You will need to reload a previous save if you accidentally attack a friendly creature and don't want to bother killing them all. In the next act they will be friendly again.