You must pay attention to your diet. Do not consume foods that are not easily digestible. Quit smoking and cut down on your intake of alcohol. Certain food items such as corn, milk, dairy products, cabbage, onion, potatoes, wheat, apples, bananas, etc. are known to cause excessive production of gas.