 And on 1 July 1863, during the Civil War, Union and Confederate forces collided at Gettysburg, Pennsylvania. The battle lasted three days and ended with a Confederate retreat. General Lee planned a northern invasion.