who was the commander of the battle of gettysburg on the unions side?