The best course is to extend the new cylinder to its full length. Then make an apparatus to attach to the upper hydraulic line fitting so that as the shaft is compressed back in it can draw hydraulic fluid in to fill the cylinder. That way it is filled when installed, and any remaining air will be eventually expelled back into the reservoir as the top is used.
BTW -- The cylinder is best changed with the top in the up position, for better access. Do the seat and trim removal with the top down, then make sure the t-handle valve on the pump is loosened [counter-clockwise a turn or two] and raise the top by hand to access the cylinder.
Then when the new cylinder is hooked up, turn on the ignition and bump the top up switch a few times to extend the shaft to mate up with the top mechanism, and install the clip.