Thank you for your interest in contributing! This guide will help you make your first contribution to open source.
- Getting Started
- Types of Contributions
- Step-by-Step Guide
- Code Guidelines
- Pull Request Process
- Getting Help
- A GitHub account
- Git installed on your computer
- Basic knowledge of using the command line (don't worry, we'll guide you!)
- Install Git: Download from git-scm.com
- Configure Git (replace with your information):
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
- Add yourself to CONTRIBUTORS.md: Perfect first contribution!
- Fix typos: Help improve our documentation
- Add Hello World programs: Share your favorite programming language
- Improve existing examples: Make code more readable or efficient
- Add new example programs: Calculators, simple games, utilities
- Enhance documentation: Add explanations, improve formatting
- Code review: Help review other contributors' pull requests
- Project structure: Improve organization and workflows
- Mentoring: Help guide new contributors
- Go to the Open Source Playground repository
- Click the "Fork" button in the top-right corner
- This creates your own copy of the repository
# Replace YOUR_USERNAME with your GitHub username
git clone https://github.com/YOUR_USERNAME/Open-Source-Playground.git
cd Open-Source-Playground# Use a descriptive branch name
git checkout -b add-my-name
# or
git checkout -b add-python-calculator
# or
git checkout -b fix-readme-typo- Open
CONTRIBUTORS.md - Find the "Add your name above this line!" comment
- Add your information following this format:
### [Your Name](https://github.com/yourusername)
- **Fun Fact**: Something interesting about you!
- **Favorite Programming Language**: Your favorite language
- **Location**: Your city/country (optional)
- **First Contribution Date**: YYYY-MM-DD- Navigate to the appropriate language folder in
examples/ - If your language folder doesn't exist, create it:
mkdir examples/your-language
- Add your program file with a descriptive name
- Include comments explaining what the code does
- If you added code, make sure it runs without errors
- Check that file formatting looks good
- Verify links work in markdown files
# Add your changes
git add .
# Commit with a clear message
git commit -m "Add John Doe to contributors list"
# or
git commit -m "Add Python hello world example"
# or
git commit -m "Fix typo in README.md"git push origin your-branch-name- Go to your fork on GitHub
- Click "Compare & pull request"
- Fill out the pull request template:
- Title: Clear, descriptive title
- Description: Explain what you changed and why
- Click "Create pull request"
- Use lowercase with hyphens:
hello-world.py,simple-calculator.js - Be descriptive:
fibonacci-sequence.cppinstead offib.cpp
- Include comments: Explain what your code does
- Keep it simple: Focus on readability over complexity
- Add a header comment: Include your name and what the program does
# Hello World in Python
# Author: Your Name
# Description: A simple program that prints "Hello, World!"
print("Hello, World!")- README files: Add a README.md in language folders explaining how to run the code
- Clear instructions: Assume the reader is a beginner
- Examples: Show expected output
- Automatic checks: Basic validations run automatically
- Review: Maintainers will review your contribution
- Feedback: You might receive suggestions for improvements
- Merge: Once approved, your changes will be merged!
- ✅ Clear title and description
- ✅ Code works and is tested
- ✅ Follows project guidelines
- ✅ No merge conflicts
- Don't take feedback personally - it's about the code, not you!
- Ask questions if you don't understand
- Make requested changes in your existing branch
- Push changes to automatically update the PR
"I can't push to the repository"
- Make sure you're pushing to your fork, not the original repository
- Check that you're on the correct branch
"My pull request has merge conflicts"
- This happens when the main branch has changed since you started
- Ask for help in the pull request comments - we're happy to guide you!
"I made a mistake in my commit"
- Don't worry! You can make additional commits to fix issues
- Or ask for help to learn about
git commit --amend
- GitHub Issues: Open an issue with the "help wanted" label
- Pull Request Comments: Ask questions directly in your PR
- Community Discussions: Use GitHub Discussions for general questions
All contributors will be:
- Added to our README contributors section
- Recognized in release notes
- Part of our amazing open source community!
We're excited to see your contribution! Remember:
- Start small: Your first PR can be as simple as adding your name
- Ask questions: We're here to help
- Have fun: Open source should be enjoyable!
Every expert was once a beginner. Welcome to the community! 🌟