If you are talking side stitches I get those while running. I Googled for some solutions and the two things that really helped were:
1. No food for at least an hour (as the above poster suggested)...I typically try to not eat for 2-3 hours before.
2. This seems weird but I SWEAR by it. Breathe in and out when your left foot strikes instead of your right foot. It's hard to get the right rhythm at first but after a while it becomes second nature.
Here is a clip from irontrybe.com about the left foot breathing:
"A side stitch is caused by stretching the ligaments that attach your liver to your diaphragm. Humans breathe out once for every two steps. More than 70 percent of humans breath out when their left foot hits the ground, while 30 percent breathe out when their right foot hits the ground. Those who breathe out when their right foot hits the ground are the ones most likely to suffer side stitches because the force of the right foot strike causes the liver to go down when their diaphragm goes up during breathing out. So the ligaments are stretched and hurt."