Burping the baby frequently may reduce the spit up tendency and the resulting mess.
Mostly, spitting up is not due to dietary problems in infants. So, making changes in formula or changing the diet of the breastfeeding mom is of little help. However, you may still consult your pediatrician about thickening the formula, expressed breast milk and feeding rice cereal in tiny amounts.
Shift the position of the baby to upright whenever you feed her/him and keep her/him upright up to half an hour after the feeding.
Don't feed much, as smaller and more frequent feedings are easier to digest.
Try offering one breast per feeding. You can also try taking him off the breast and putting him back after the initial flow of milk has subsided.
If you are giving him supplemental vitamins, iron, or fluoride, then immediately discontinue them as most breastfed babies don't need vitamin supplements.
If you are taking herbal or vitamin supplements, try to stop them and see if it makes a difference in the spit-up.
If your baby has just started having new food, stop offering it as this may be the cause for spit- up.