Are you constipated? Constipation causes gas. Drink lots of water, exercise, fiber, etc. On the other hand, eating a lot of fiber causes gas, too, so you have to find a balance.
This is going to sound um....weird, but when you are feeling the gassiness and you know it needs to come out, get in knees chest position-you know, with your bum way up in the air and your chest flat on the ground, and the gas will "rise to the top" so to speak.