How to Add Code of Conduct to Your Project on GitHub?
Last Updated :
07 Jun, 2024
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 RepositoryStep 2: On the left side click on Create new file.
Create new File on GitHubStep 3: Type CODE_OF_CONDUCT.md into the new file field.
Create code of conduct fileStep 4: Choose a template from the right side screen.
Choose template for code of conductStep 5: The Code of conduct template will appear on the screen.
Code of Conduct TemplateStep 6: Select the code of conduct file as per project requirements.
Choose template fileStep 7: Click on the Review and submit button.
Submit and Review Code of ConductStep 8: The code of conduct file is ready to add to your project.
Add code of conduct to the projectStep 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 BranchStep 11: Click on Create a pull request to add the code of conduct file to the project.
Create Pull requestStep 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.
Similar Reads
How to Contribute to Open Source Android Projects on GitHub? Contributing to open-source projects is an excellent way for developers to improve their skills, gain experience, and give back to the community. Android projects on GitHub offer a rich ecosystem where you can collaborate, learn, and make a tangible impact. This guide will walk you through the steps
3 min read
How to Push a Project and Contribute on GitHub? GitHub is a powerful platform for hosting and collaborating on code repositories. Whether you're working on an open-source project or collaborating with a team, knowing how to push a project and contribute on GitHub is essential. This article will guide you through the steps to push your project to
5 min read
How to Upload Project on GitHub from Android Studio? Learning how to upload a project to GitHub from Android Studio is an essential skill for developers, as it allows you to share your code, collaborate with others, and manage version control. With GitHub integration in Android Studio, it's easy to push your project to a repository. This guide will wa
3 min read
How to Contribute to Open Source Projects on GitHub? Contributing to open-source projects is an excellent way to improve your skills, gain experience, and give back to the developer community. GitHub, the largest platform for open-source collaboration, makes it easy to contribute to projects, whether you're fixing bugs, adding features, or improving d
8 min read
How to Add Licensing to Your Open Source Project on GitHub? Open-source projects are a great way to share your code and collaborate with others. However, without proper licensing, your project may face legal issues and misuse. Adding a license to your GitHub project is important for protecting your work and clarifying how others can use it. In this article,
3 min read