Why you should have a code of conduct on GitHub

Why you should have a code of conduct on GitHub

Originally posted on Dev.to.

I decided to add a code of conduct to my current and future repos on GitHub. Based on my personal experiences I made my choice when I asked these questions:

  • What is the purpose of a code of conduct?
  • How can I prevent negative behavior in the future?
  • What enforcement will take place for rule violations?

The purpose of writing this article is to advocate creating a safe space and a welcoming environment in the open-source community. As developers, we should respect one another and this includes contributing to open source projects.

A few bad apples make it bad for everyone

Any good open-source project will have a detailed README.md and a CONTRIBUTING.md in the repo. It is important to create a positive environment for contributors. However, negative and toxic behavior can push contributors away from a project.

Git commits and documentation are not for harassment

Commits and proper documentation are used to document changes in a project. The purpose is not to bully or harass individuals who made a mistake. This can deter contributors from contributing to another project. Examples of a toxic open source environment were calling out people's first names in the commits, putting down contributors, taking credit, and not acknowledging the work of others. I have been on the receiving end and the outcome was not pretty.

A code of conduct is needed

If you want multiple contributors to your open-source project having clear guidelines for contributors is essential. Adding a code of conduct on my part was to make my projects welcome to anyone who wanted to contribute. You can choose to adopt a code of conduct that reflects your community standards.

Final thoughts

The Code of Conduct is meant to create an inclusive environment. Having one creates boundaries for open-source projects and makes sure everyone follows the guidelines when contributing. Encouraging participation in the community and creating a harassment-free environment makes contributors feel welcome. I would welcome any contributions to a project.

Subscribe to Coding Fatale

Sign up now to get access to the library of members-only issues.
Jamie Larson
Subscribe