Creating a Code of Conduct for your GitHub repository is a great way to set clear expectations for how contributors should interact within your project.
Whether you're maintaining an open-source project or collaborating with a team, having a Code of Conduct fosters a healthy and respectful community.
In this step-by-step guide, let’s check out how to easily add one with a practical demo.
Steps to follow:
1. Navigate to the repository where you want to add the Code of Conduct.
2. Click the 'Add file' button, then select 'Create new file' from the dropdown menu.
3. In the file name field, type 'CODE_OF_CONDUCT.md'. Then, either select 'Choose a template' or write your own custom Code of Conduct from scratch.
4. Choose the Code of Conduct template that best suits your project.
5. Click 'Review and submit' to autofill the Code of Conduct.
6. Review the generated Code of Conduct, then click 'Commit changes' to save it.
7. Add a commit message, then click the 'Commit changes' button to create the 'CODE_OF_CONDUCT.md' file.
8. The 'CODE_OF_CONDUCT.md' file has been successfully created.
That's it!
You have successfully created a Code of Conduct for a Repository in Github.
By setting up a Code of Conduct, you're taking an important step to ensure your GitHub repository remains a positive and inclusive space for everyone. Now that it's in place, contributors will know exactly how to engage with your project and each other in a respectful manner.
Still have questions?
Send an email to archana@leadwalnut.com, OR
Book a FREE consultation with an expert developer here.