π€πΌ Contribute
Learn how to contribute correctly to projects.
Overview
Contributing to projects
Contributing to projects involves more than just submitting code. Hereβs a guide on how to contribute properly, including what to consider regarding code, licenses, and intellectual property:
-
Code and Licenses
- Respect Licenses: It is crucial to adhere to the licenses of the project you are contributing to. Each project may have a specific license that dictates how the code can be used, modified, and distributed.
- Code Becomes Part of the Project: Once your code is accepted and merged into the project, it becomes an integral part of the project. This means that your contribution is no longer solely yours, but part of the project's codebase.
-
Copyright and Control
- Loss of Control over Code: By contributing code to a project, you generally relinquish some copyright and control over that code. Intellectual property rights of the code are transferred to the project or the managing organization, according to the established policies.
- Contributors: As a contributor, itβs important to understand that once your code is part of the project, you do not retain exclusive rights over it. The project community or team may modify, redistribute, and use your code as needed for the project.
-
Contribution Practices
- Follow Coding Standards: Make sure to adhere to the style guidelines and best practices set by the project. This includes code formatting, naming conventions, and proper documentation.
- Reviews and Feedback: Being open to reviews and feedback is essential to ensure your contributions meet the projectβs standards. Peer review is a crucial part of the contribution process.
-
Contribution Process
- Create Pull Requests: Most projects use pull requests to integrate changes. Be sure to provide a clear and complete description of the proposed changes.
- Testing and Validation: Ensure your code passes all tests and validations before submitting. This helps maintain the quality and stability of the project.
Contribution standards
To indicate the type of changes you're making in a repository, include one of these emojis at the start of your commit or pull request message. This helps create a more visual and organized repository.
| Emoji | Unicode | Action / Type |
|---|---|---|
| π | U+1F4DD | Update release notes |
| βοΈ | U+270F | Typo corrections |
| β¬οΈ | U+2B06 | Major updates or new releases |
| π | U+1F69A | Redirection/rename changes |
| π | U+1F4C4 | Add licenses, markdowns, etc. |
| π¨ | U+1F528 | Bug fixes |
| β¨ | U+2728 | New features or enhancements |
| π§ | U+1F527 | Technical improvements or general adjustments |
| ποΈ | U+1F5D1 U+FE0F | Remove unused code or files |
| π | U+1F4DA | Update documentation |
| β»οΈ | U+267B U+FE0F | Use of best practices and code reuse |
| π· | U+1F477 | Troubleshooting issues |
| π¨ | U+1F3A8 | Code refactoring (without changing functionality) |
| πΌοΈ | U+1F5BC | Visual design refactoring |
| π | U+1F680 | Performance improvements |
Automate your commits
You can easily automate your commits or pull requests by creating a file named commit.sh and running it from your terminal or Git Bash to improve the performance of your commits.
#!/bin/bash
git add .
echo "Select the type of commit:"
echo "1) π Update release notes"
echo "2) βοΈ Typo corrections"
echo "3) β¬οΈ Major updates or new releases"
echo "4) π Redirection/rename changes"
echo "5) π Add licenses, markdowns, etc."
echo "6) π¨ Bug fixes"
echo "7) β¨ New features or enhancements"
echo "8) π§ Technical improvements or general adjustments"
echo "9) ποΈ Remove unused code or files"
echo "10) π Update documentation"
echo "11) β»οΈ Use of best practices and code reuse"
echo "12) π· Troubleshooting issues"
echo "13) π¨ Code refactoring (without changing functionality)"
echo "14) πΌοΈ Visual design refactoring"
echo "15) π Performance improvements"
read -p "Choose an option: " type
case $type in
1) prefix="π update release notes" ;;
2) prefix="βοΈ typo corrections" ;;
3) prefix="β¬οΈ major" ;;
4) prefix="π redirection/rename changes" ;;
5) prefix="π update docs" ;;
6) prefix="π¨ Bug fixes" ;;
7) prefix="β¨ feature" ;;
8) prefix="π§ improvement" ;;
9) prefix="ποΈ remove" ;;
10) prefix="π update docs" ;;
11) prefix="β»οΈ use of best practices" ;;
12) prefix="π· troubleshooting" ;;
13) prefix="π¨ code refactoring" ;;
14) prefix="πΌοΈ design refactoring" ;;
15) prefix="π performance improvements" ;;
*) echo "Invalid option"; exit 1 ;;
esac
read -p "Enter commit message: " message
git commit -m "$prefix: $message"
Conclusion
Contributing to a project is an opportunity to collaborate and enhance the software, but it also comes with responsibilities and commitments. By following these guidelines, youβll ensure that your contributions are valuable and effectively integrated into the project.