It was common when there was a threat of ambush on the flanks of the column by cavalry. With single shot weapons the square formation was still a potent tool in the 1860s.
My experience with massed columns and bayonets revealed one flaw, low hanging vegetation, and shoulder carried long arms with bayonets attached--- doesn't work well.
David