What are good exercises to prevent carpal tunnel surgery?

None. There are tendon and nerve gliding exercises that have been described. I have not found these very effective in treating carpal tunnel syndrome. You can try doing exercises for a period of one month to 6 weeks. If you're carpal tunnel symptoms are not resolved i would consider surgery.
Carpal tunnel. Here is a link to information on this subject: http://www.Mayoclinic.Com/health/carpal-tunnel-exercises/an01984/method=print make sure the problem is at the carpal tunnel. Then define the cause, including metabolic problems (diabetes, thyroid or other). Then plan treatment, sometimes with splints at night, and changed ergonomics and exercises in the day. If exercises make symptoms worse, stop.