How do you prevent from getting nervous around a girl?

Well, the way I go about it is (when I'm nervous around a girl) is just admitting it (avoid yelling or screaming it in their ear and also avoid blurting it out, just say it as if you were saying it to a trusted friend) because girls will think it's cute and kind of charming.