How did the US telegraph system work during Civil War?

Bruce Catton says “On December 24 [1864] Sherman sent Lincoln a whimsical telegram, offering him the city of Savannah as a Christmas present.”

Had North and South agreed to keep the nationwide system working, or what? How else could he telegraph Savannah to Washington? If the system existed, what were the agreed rules about the two armies using it?

As the Union Army moved south, Telegraph wires were laid.
This and the rapid expansion of the rails were 2 big advantages the North had.

Under Lincoln, the U.S. Military Telegraph Corps were created.

I’m trying to find a cite, but as I recall, over 15,000 miles of Telegraph wires were run.

The United States Military Telegraph Service (USMT) handled some 6.5 million messages during the war and built 15,000 miles of line. In contrast the South used the telegraph in only the most limited fashion.

From here:

Often the telegraph followed the railroad lines. They needed it to control the line anyway.

That is true, but in the case of the Civil War, the Telegraph mainly followed the armies.

And the Union army laid some new rail lines down. And were often able to repair Confederate sabotage of their rail and telegraph lines within hours, while it often took the Confederates days or weeks, if ever, to do the same.

Militaries laying wires were also how military communications happened prior to the development of portable radios. As John Keegan noted, the British term for it - wireless - described its military utility much more succinctly. There’s often a lot of blaming of generalship during WWI for the scale of the bloodbaths, but after the orders were given, there was little that could be done to modify the flow of events. Any attempt to lay wire across no man’s land inevitably resulted in the wire being cut by artillery fire. Wires leading to front line trenched was buried underground to prevent this from happening.

I would guess that this particular telegram was sent by ship from Savannah to Fort Monroe, then on to Lincoln via an actual telegraph line.

That must have been it – Catton says Sherman was incommunicado once he left Atlanta, so he wasn’t laying wire behind him.