Now, I understand that some women avoid working developer jobs because they get mistreated by some men. That is an issue. But it's not an issue limited to developers, and it's not an issue limited to women. If anyone is treating anyone else like shit, then they should be fired. Sex doesn't come into question -- being a decent human being does. If you're afraid to work a job because someone might mistreat you, then you're afraid of working every job.
Even if we eliminate cases like those of Github/Hovarth, it doesn't necessarily mean there will be a 50/50 split. And it doesn't matter. It's not important how many people of a certain gender there are -- what's important is that people are judged on their skills and character alone. If that means there is a gender divide, then so be it.