who was the commander of the union forces at the battle of gettysburg?