If you suffer from excess gas, you must avoid drinking aerated beverages and foods that contain carbohydrates and starch. Avoid carbonated drinks such as aerated water, soda, colas, etc. as these increase the flatulence. Do not consume milk and milk products if you suffer from lactose intolerance. Instead, opt for vegan sources of milk such as soy milk or almond milk. Reduce intake of foods that are known for excess gas formation such as broccoli, beans, cabbage, lentils, etc.
You must also ensure not to eat heavy meals at one go. It is better to split the meals into smaller portions and eat frequently throughout the day. Also, limit your alcohol intake. Chewing gum too frequently also predisposes you to increased flatulence. So, if you suffer from frequent gas, it is better to avoid chewing gum.