Another trick is when riding with your hands on the top of the bar, make sure that your thumbs go under the bar, and not rest on top alongside your hand. This reduces pressure on the nerve, and helps reduce numbness.
I discovered quite by accident, as I am running a flat bar on my folder. I have an 11 speed kit, and shift up and down regularly as I ride. I noticed that my right hand was getting numb, and my left hand was not. The difference was entirely because I was keeping my thumb on top of the bar to actuate the shifter. After making a conscious effort to keep both hands in the same position as much as possible, my right hand is no longer getting numb.