Open In App
Related Articles

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

Improve Article
Save Article
Like Article

The guidelines play important role in the community for contributing or adding something to it. The proper and well-written guidelines and instruction manuals help the community and developers to add more contributions to the community. The community moderators need to develop the content and guidelines that suit the community standards and help others to contribute to the community. The community guidelines define the community goals to the developers and contributors, while creating guidelines for the community be specific with each and every instruction you are writing because every contributor starts contributing by reading community guidelines. 

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 force 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.


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


Step 3: Type into the new file field.


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


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


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


Step 7: Click on the Review and submit button.


Step 8: The code of conduct file is ready to add to your 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.


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


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


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.


The code of conduct file is essential for every open source community and its defines community guidelines for your project to all contributors. The guidelines for the community should be specific and clear to all contributors and the code of conduct should be developed as per the community standards.

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 15 Sep, 2022
Like Article
Save Article
Similar Reads