Put the autopilot in wind mode, adjust to zero degrees and motor forward slowly. The auto pilot does a lot better job keeping the boat into the wind than hand steering. Haven’t snagged a batten in the lazy jack in a long time using this technique.
However, do watch where you are going. It sometimes takes longer than you think to get the main sail up and that island in front of you is getting closer every second.