I got it in my first pregnancy at about 32 weeks and haven't got it as yet in this pregnancy. I was told to test my blood before each meal and record it in a diary.
You need to follow a low GI diet; there's loads of websites you can look at.
Essentially you need to cut out sugary processed foods; no fruit juice, small portions of pasta, bread, rice etc (and even then NOT white). Also, cereals tend to be very sugary, as is milk (the lactose) so keep that to a small portion or choose a very boring bran cereal.
Also your portion sizes really matter; when I was diagnosed I was asked to keep a food diary and they were puzzled as I was eating well, they concluded it was my portion sizes that was the problem.
Also, 20-30 minutes walk each day for exercise should help.
I was induced at close to 39 weeks as they said my baby was on the large side, which she wasn't when she appeared, but the induction was fine and if you have to go through it, don't panic.
There used to be a GD support thread on here, not sure if it still exists, but if you do an AF you can even read the old one. There are lots of tips on it about what to eat.