>Telling people to be nice in a git repository is fine
Did you miss that line?
Carefully enforced codes of conduct as an absolute must is not asking for respect. A vast ocean lies between them.
Normalizing life governed so in ever expanding circumstances is – really it is difficult to find a different word for this – fascist.
Leftist fascism is something new, and unfortunately something very many people want, at this point mostly unaware or only in-effect. Many people find values, actions, and ideas different from their own as dangerous, ugly, or wrong. Diversity is turning into dichotomy (you're in or your out).
Promoting and normalizing enforcement of social rules under the guise of helping people is exactly how fascism grew, and it was always promoted as something good, helpful, and necessary.
You don't need rules to manage a community. That doesn't mean you can't manage it, kick out somebody who isn't boing nice, or tell someone they are being inappropriate.
Rules are the enemy of good judgement, each one you enact is an admission of inadequacy. Nobody is perfectly adequate. Rules have a place, a purpose, a need. Put them where they are unavoidable and rebel against them where they aren't. The world isn't fixed by legislation, rules should be safety nets not train rails.
Rules are dangerous and wanting them everywhere so the world will act like you want is the root of evil which has happened many times before, small starts like insisting codebases are inadequate, unprofessional, and "other" if their rules aren't up to your standards isn't the last step towards something awful, but it paves the way towards the next one.
My issue isn't with some places having rules, variety is good. My issue is with the absolute and the othering.