Contributing to Open Source with GSSOC & SWOC
If you’ve registered for GSSOC (GirlScript Summer of Code) or SWOC (Social Winter of Code) but still find yourself asking:
❔ How do I actually contribute to an open-source project?
❔ Where do I start?
❔ "Merge conflicts" sound intimidating to you?
Don't worry—you’re not alone! (I had the same issue) 😅
Let me be a little shameless here…
👩💻 Check out my GitHub profile — KajalDeore04. Follow me or give my repo a star and make me famous! 🌟
First of all, let me tell you that contributing to open source is truly amazing. I didn’t realize how much I’d enjoy it when I first registered.
Why YOU should start contributing:
- Test your programming skills and become a God-level programmer! 🗿
- Get better at using Git and GitHub. Your GitHub graph will be stacked! 💪🔥
- End the cycle of sitting and wondering, "Where do I even start coding?"
Steps to Get Started:
Step 1: Find a Bug or Suggest a Feature
Start by exploring the repository for issues. Found a bug or want to add something cool? Create an issue or pick one that’s already listed and wait until the admin assigns it to you. Boom, you're ready to dive in! 🏊♂️
Step 2: Fork the Repo 🍴
Fork the repository you want to work on—this creates your personal copy of the project. Essential, since you can’t directly edit the admin’s repository.
Step 3: Create a Local Repository 📁
Click on "Code" and copy the Link.
git clone <copied link>
Step 4: Start Working in Your Code Editor 💻
Solve the issue and once done…
Step 5: Create a New Branch 🌿
Never work directly on the main branch. Instead, create a new branch for each task:
git checkout -b "branch-name"
Use descriptive names:
- For bugs:
bug/<issueNo>-<bugName>
- For features:
feat/<issueNo>-<featName>
Step 6: Push Your Code ✨
Stage your changes:
git add .
Commit with a message:
git commit -m "commit message"
Push it to your branch:
git push
Set the upstream branch when prompted:
git push --set-upstream origin branch-name
Step 7: The PR Party 🎉
Create a Pull Request (PR) to share your changes.
- Select your branch for merging.
- Mention the issue you’re solving using keywords like
fixes: #42
. - Describe your changes—why you made them and how they work. Attach screenshots if applicable! 📸
After Party — Keep the Main Branch Fresh 🌱
Once your PR is complete:
git switch main
git pull upstream main
Create your next branch from the updated main:
git checkout -b "new-branch-name"
Uh-Oh, Merge Conflicts! 😱
When merge conflicts occur:
- Pull the latest changes:
git pull upstream main
- Resolve conflicts by deciding what stays and what goes:
git add .
git rebase --continue
git commit -m "Resolved merge conflicts."
- Push your changes:
git push -f
Pro Tip: Stay Updated 🔄
Keep your fork synced with the original repository to avoid conflicts:
git pull upstream main
git push
That’s It! 🎉
Still here? Checkout my GitHub profile — KajalDeore04. Follow me or give my repo a star and make me famous! 😅🌟
Congratulations! You’ve mastered the art of contributing like a pro. Keep your branches tidy, PRs descriptive, and screenshots plentiful. Happy coding, and may the Git be with you! ✨
Top comments (0)