I subscribe to civilwardata.com, and here is what I found.
J.H.Dennard enlisted approximately 2/1/1862 in the Texas 12th Infantry as a sergeant. (The 12th was also known as Texas 8th Infantry Regiment). No further info on him.
In May of 1863 through April of 1864 the 12th was part of Hawes/Wauls Brigade, in Walker's Division , part of the District of West Louisiana army. With that info, I see no way your ancestor served at the battle of Gettyburg in July of 1863.