John R. Neff, a professor at the University of Mississippi, has written about this. He tells us the following --
From 1870 to 1873, Rufus Weaver and his small crew of workers traversed the battlefield, opening graves, and boxing their contents for shipment. Weaver, wtih his knowledge of anatomy, insisted on sifting the graves himself. Remains were removed from at least ninety-six locations seperate locations, ranging from hospital burial grounds to farmer's fields. In many cases, the soldier's home state could be identified even if his identity had been lost. So, in 1871, 74 sets of remains were shipped to the Ladies Memorial Association of Charleston, South Carolina, 101 sets to Savannah, Georgia, and 137 sets to Raleigh, North Carolina. Over the next two years, six seperate shipments containing a total of 2,935 remains were sent to the Ladies Hollywood Memorial Association of Richmond. MOst were boxed together as sets of mutiple skeletal remains. In some few cases, the graves remained well identifed enough to make individual removals. Weaver forwarded 73 identified soldiers to those four Southern cemeteries. The loss of identity whwre graves had once been marked was especially painful, and many of the reburials in the South were necessarily in mass graves. For example, of the remains shipped to Georgia, only 2 were reburied in individual graves. The other ninety-nine were interred in eight mass graves.
John R. Neff, Honoring the Civil War Dead: Commemoration and the Problem of Reconciliation, p. 156-57.
Professor Neff also explains that remains of any Confederate soldiers found on the Gettysburg battlefield are never reburied there. In fact, if there's any question as to the identity of a set of remains, Federal or Confederate, they are presumed to be Confederate and are sent to the nearest Confederate cemetery.