The following information appears in BROKEN FORTUNES: SOUTH CAROLINA DEAD IN CSA SERVICE 1861-1865, by Randolph W. Kirkland, Jr., (Charleston: 1995):
HAMMET, J. B. N., PVT, Co. B, 1st (Charleston) Battalion SC Infantry, Charleston Dist., KIA, Secessionville, SC, 16 Jun 1862.
HAMMETT, Gideon, PVT, Co. F, 16th SC Infantry, Greenville Dist., DOD (Pneumonia), 28 Jun 1864. (Suspect someone misread "J" for "G").
Don't know who your man in Barnesville is, but doubt he is either of the above.