There’s only so much you can do to reduce your risk of gestational diabetes – some women will develop it regardless of how healthy their lifestyle is.
However, most people can make it less likely through:
Gestational diabetes occurs when your body becomes resistant to the insulin it produces. This happens as a result of the increased insulin demands imposed by the hormonal changes that occur during pregnancy 
Gestational diabetes causes blood glucose levels to run higher than they normally would.
If you have made a decision to try to have a baby, try to maintain a healthy weight before becoming pregnant. If you are overweight, that doesn’t necessarily mean you will develop gestational diabetes, but it does increase the risk. Having a body mass index (BMI) of more than 30 makes you three times more likely to develop gestational diabetes than having a BMI of 25 or less. 
If your BMI is higher than 30, you will be offered an oral glucose tolerance test in order to assess your blood glucose levels.
This should be offered before you are 16 weeks into your pregnancy – in women with a BMI of 25 and under, an oral glucose tolerance test should be offered between 24 and 28 weeks of the pregnancy.
If you have high blood glucose levels, some of the glucose may be transferred to your baby. This can cause excessive growth, leading to a condition called macrosomia.
It’s important to lose any weight you need to lose before becoming pregnant. Generally, losing weight while pregnant is discouraged. Weight gain during pregnancy is entirely expected – even in obese women. 
There are several reasons it’s important to follow a healthy diet during pregnancy, one of which is to lower the risk of gestational diabetes.
To lower your risk of gestational diabetes, follow a diet that doesn’t raise your blood glucose levels too much to begin with.
There’s no ” special diet ” for gestational diabetes. General principles of healthy eating apply. The most important thing is that you eat few processed foods, because they contain empty calories, and eat plenty of vegetables and “natural” foods.
Speak to your doctor about the best diet for you.
Many people believe that strenuous exercise during pregnancy harms the baby, but recent evidence suggests that this isn’t the case. However, because pregnant women have more blood in their bodies, strenuous exercise can put more stress on your heart Just to be on the safe side, it’s often best to stick to moderate exercise.
Besides, you might find strenuous exercise a bit too physically demanding during pregnancy. 
If you struggle to fit 30 minutes of exercise into your day, don’t blame yourself. The important thing is that you do something, even if it’s just getting off the bus one stop early or walking a journey you would usually drive
Preventing diabetes after pregnancy
Preventing type 2 diabetes is similar to preventing gestational diabetes: you have to follow a healthy diet, stay active and maintain a healthy weight.
A study published in 2015 indicates that mothers who breast-feed their children are less likely to develop type 2 diabetes than those mothers who don’t.
The researchers argue that, because breast-feeding uses up glucose and fat in the bloodstream by transferring them to the baby, the mother’s pancreas has to produce less insulin in order to bring down high blood glucose levels. This reduces the risk of insulin resistance