For the rod-shaped Gram-negative bacterium Escherichia coli, changes in cell shape have critical consequences for motility, immune system evasion, proliferation and adhesion. For most bacteria, the peptidoglycan cell wall is both necessary and sufficient to determine cell shape. However, how the synthesis machinery assembles a peptidoglycan network with a robustly maintained micron-scale shape has remained elusive. To explore shape maintenance, we have quantified the robustness of cell shape in three Gram-negative bacteria in different genetic backgrounds and in the presence of an antibiotic that inhibits division. Building on previous modelling suggesting a prominent role for mechanical forces in shape regulation, we introduce a biophysical model for the growth dynamics of rod-shaped cells to investigate the roles of spatial regulation of peptidoglycan synthesis, glycan-strand biochemistry and mechanical stretching during insertion. Our studies reveal that rod-shape maintenance requires insertion to be insensitive to fluctuations in cell-wall density and stress, and even a simple helical pattern of insertion is sufficient for over sixfold elongation without significant loss in shape. In addition, we demonstrate that both the length and pre-stretching of newly inserted strands regulate cell width. In sum, we show that simple physical rules can allow bacteria to achieve robust, shape-preserving cell-wall growth.