While breastfeeding a gassy baby, vegetables like cabbage, cauliflower, broccoli, and beans should be avoided.