Occasional flatulence is unavoidable, but embarrassing just the same. To prevent excess gas, try these tips: 1. Limit gas-producing foods, such as beans and broccoli. 2. Eat fewer fatty foods, such as fried foods and fatty meats. 3. Take a short walk after meals. 4. Try an over-the-counter anti-gas product.