Yeah, you have to twist the cylinders as you push them back in. I had a hell of a job doing mine.
The problem is that the threaded handbrake screw arrangement stops you just pushing it straight back, so you need to push and twist. The threaded part attached to the piston is unfortunately also free to spin inside, so sometimes you turn and turn and it doesn't go anywhere.
I ended up hammering and twisting, using a piece of wood to stop any damage to the cylinder or caliper. Had to undo the bleed screw to allow the fluid out, too.
As Hellcat says, there is a proper tool available from good car bit shops.