German farmers have ended their ten-day strike after winning assurances from major retailers that milk prices would increase.