With its cloud of skirmishers in advance
Walt Whitman, An Army Corps on the March
The Battle of Gettysburg began when Henry Heth's Corps was marching to Gettysburg to get some shoes. They knew some Union cavalry was in the town but they expected it to be a small party and not John Buford's two Brigades, well placed on Willoughby run and McPherson's Ridge and armed with breech-loaders that had a five to one firing advantage over the Confederate weapons. Buford's objective was to hold his position until John Reynolds and his First Corps could come up to preserve the strategically advantageous position for the Army of the Potomac.
The Second Corps that included the 1st Minnesota and Company K were still on the march to Gettysburg, but they were close enough to hear the sound of the guns and they knew a battle was raging.