Consonance is a literary device where the repetition of consonant sounds occurs within a phrase or sentence, creating a musical effect. It doesn't require the vowels to be the same, just the consonants.
In your example, "that" and "hit" both end with the consonant sound "t", but the vowels are different ("a" vs "i"). This is a clear example of consonance.