Well, condom can reduce risk of herpes transmission, but not 100% prevent it. As long as you get skin to skin contact, you can get it.

Your gf may even have gotten herpes herself from using public toilets without properly wiping the toilet seats