Man, when I first went on the Metformin (1000mg a day) I was sick every time I ate or drank ANYTHING. There were even a couple times when I almost didn't get to the bathroom, if you catch my drift. It was awful!! Finally I went back to my endocrinologist about it, and they took me off the generic version and put me on Fortamet, which goes down easier. They also put me on 500 mg/ day until I had gone several weeks without any major upsets. I recently went up to 1000 mg on the Fortamet, and so far no problems!
As far as avoiding them other than changing meds/ dosage- it seemed that foods that were starchy, sugary, or greasy just made it that much worse. The blander the food, the happier my stomach was. And roughage was just that- rough!!
Hang in there- it will get better in time, I promise, and it's helped me start losing weight at last so it's worth it!