There's an even simpler way, if you still have the plastic plugs that the replacement cylinder had when you bought it. Leave the plugs in the cylinder, fill the reservoir with fluid, and work the pedal up and down just enough to make the M/C piston move about 1/2" or less. Air will be displaced from the cylinder and bubble up into the reservoir. When the bubbles stop, the M/C is purged of all the air inside it. Connect the lines and bleed as usual at the wheels.
Jerry