Sterile women dating
I make sure we're on the same page before anything begins.Think about it from the perspective of your own self-interest too, if you're with this girl for years and you presumably have feelings for each other, having to break it off after all that time will hurt you as well as her.
Kids are one of those things most people can't compromise on. It's one of those things that probably should be even slightly discussed early in any serious relationship.
Honesty is the best policy in this particular case. Being sterile is something that could be overcome, for example by adopting, but a conscious choice not to have kids cannot.
I wouldn't say that it is completely the same, since getting a vasectomy is a conscious choice whereas being sterile may not be, and your gf might not even know that she is sterile. Getting a vasectomy when you actually want kids seems a bit weird to me. But now it puts all the power in males hands and feminists may be triggered.
If you want to hide it from your girlfriend that's your choice, but at that point your relationship is on borrowed time.
You might as well deal with it now rather than later.