For that they use a couple of analog knobs to adjust the generator speed, and a specialized type of analog meter called a synchroscope, which measures phase difference. When it's at zero and not moving, they pull the big lever.
This is very much like trying to jump onto a train from another train moving alongside it.