Thanks for the query
At three months in a breast and formula feed baby green stool
is common. Actually green color is due to bile pigment in stool which usually breakdown into its products giving normal yellow or brown color to the stool. In infancy actually enzymes are not fully matured used in bilirubin metabolism
. Passage of gas and bloating
can be prevented by keeping the baby in upright position after feed and burp him frequently. Chances of bloating is more in bottle fed baby as baby swallow more air during bottle feed in comparison to breast feed. If size of nipple is small it will allow the baby to gulp air. You can avoid excess dairy products, legumes, tomato in your diet. Follow all these measures and observe for recent gross change in frequency and consistency of stool.
Even after this if symptom persists or any other change in baby's general health, then consult your doctor.
I hope this answers your query effectively.