Giraffe Evolution
The giraffe evolved directly from the okapi, a deer-like creature with a short neck.
Mammal Evolution
Mammals evolved more than 200 million years ago in the Triassic period, from Synapsidae, a group of animals called "mammal-like dinosaurs."
Early Mammals
The first mammals had dog-like skeletons, and short necks; their skeletons resemble dogs and rabbits far more than they do giraffes.
The Neck
Both the giraffe and the long-necked sauropods developed their necks for the same reason: to reach vegetation from the upper branches of trees.
Conclusion
Technically speaking, the giraffe did evolve from sauropod, as did all mammals. But so did the bird, which far more closely resembles its dinosaur ancestors.