I'm assuming that you are using a decent cadence.
The strategy will be different depending on the size and length of the hill.
Keep in mind that the front shifts much more slowerly than the rear.
If I'm hitting a long/steep uphill, I will shift the front down and
also shift the rear up when it's easy to do (ie, when it's flat). That way, I can do quick rear downshifts as needed.
Note that, since I ran my gears through a gear calculator (
www.sheldonbrown.com), I know exactly where my gears are.
If the hill isn't that long, I might just shift the rear. If the hill is real short, I might just stand. If it's rollers and the hill is short, you can often apply a bit more speed on the downhill/flat before the uphill and avoid shifting entirely.