who was the commander at gettysburg for the union?