How to Add Code of Conduct to Your Project on GitHub?

A Code of Conduct helps to define community standards and ensures a welcoming environment for all contributors. Adding a Code of Conduct to your GitHub project is simple and can significantly enhance the collaborative spirit of your project. In this article, we will see how to add a Code of Conduct to your project on GitHub.

What is a Code of Conduct?

The code of conduct defines community standards and creates an engaging community that needs well-written guidelines before starting with the code of conduct research community goals, standards, and rules. The community code of conduct is an important search for other community guidelines for reference and while writing the code of conduct be specific with community values. The different tools are also available to design a code of conduct for the community you can also take references from them. The default code of conduct templates are also available but the community leaders are forced to develop original content for the community.

How to Add Code of Conduct to Your Project

Step 1: Navigate to the main page of the GitHub repository.

Navigate to Project Repository

Step 2: On the left side click on Create new file.

Create new File on GitHub

Step 3: Type CODE_OF_CONDUCT.md into the new file field.

Create code of conduct file

Step 4: Choose a template from the right side screen.

Choose template for code of conduct

Step 5: The Code of conduct template will appear on the screen.

Code of Conduct Template

Step 6: Select the code of conduct file as per project requirements.

Choose template file

Step 7: Click on the Review and submit button.

Submit and Review Code of Conduct

Step 8: The code of conduct file is ready to add to your project.

Add code of conduct to the project

Step 9: Write a meaningful commit before adding the code of conduct file to your project.

 

Step 10: Create a new branch or commit to the master branch of the project.

Create new Branch

Step 11: Click on Create a pull request to add the code of conduct file to the project.

Create Pull request

Step 12: Now the code o conduct file is successfully added to your project.

How to Add Code of Conduct to Your Project on GitHub?

You can also add a code of conduct file manually but the above way is more flexible and convenient to add files to your project.