Gender reveal?

Sarah

First off, when is the earliest you can find out the gender? Secondly, if I’m giving my baby up should I find out what it is or not so I don’t get any more attached?