As I recall, the difference with a 6g and a 6G is as is being mentioned here: the difference from internal and external threads. Case sensitivity needs to be observed. The change in letter, as we ascend with the alphabet designates a tighter thread class.
Another thought has entered my tired mind in that if you plan to match a 6h internal with a 6H external thread, you will ultimately find yourself in an interference condition where parts will only mate when they are in their least material state. As you reach maximum material conditions, you'll find bolts and nuts not going together.
Becareful, I may have confused the cases with the wrong internal/external designations.
Regards,
Kevin