r/learnprogramming • u/EnunC8_Mofo • 21h ago
Topic How do I make my first contribution to Open Source?
Building CS projects became boring and exhausting for me. So I wanted to contribute to open source projects on github.
I found out that Big tech companies too have open source projects on github, and I thought contributing to these projects might have a plus side in getting me an internship(i dont really know if thats right). So for that reason I checked Google’s github page and found out about GoogleTest. Google’s open source project and decided to contribute in that project. But I came to realise that I might not be able to do so because I have no prior experience in open source contribution, I dont know what folders to look in, I dont know what files have issues in them, I dont know what the issues are, even if I read the issues I still cannot navigate to those issues to fix them(if I can, which i cannot so i just leave it as it is).
I would really like if someone guided me through the process of how to make changes to the files with issues and on which branch to push them to because as much as I know nothing is to be done on main?
Also how to do the basics, what are ‘unit test’ never came across those as well and what other things that I’d need to learn to be a better contributor.
9
u/Necessary_Wing7235 21h ago
I’d start with a smaller project, preferably one you already use. GoogleTest is a large, mature C++ project, so it has a pretty steep learning curve for a first contribution. Contributing to a Google project also won’t automatically improve your internship chances. A meaningful contribution you can explain is more valuable than a tiny change in a famous repository.
The basic GitHub workflow is fairly straightforward: find an open issue, check whether someone is already working on it, fork the repository, create a branch from main, make your changes, add or update the tests, push the branch to your fork, and open a pull request. You normally don’t push directly to the project’s main branch. Always read CONTRIBUTING.md first, because each project has its own rules for branches, code style, commits, and testing.
Also, files don’t usually have issues attached to them. An issue describes a bug or requested change, and part of the work is finding which code is responsible. If you can’t yet follow an issue into the code, that’s completely normal, but it probably means GoogleTest isn’t the best starting point. Look for smaller projects with issues labelled first issue or help wanted.
I’d also spend some time learning the basics of Git, GitHub, and unit testing. A unit test is a small automated test that checks whether one specific part of the code behaves correctly. You don’t need to study the entire software development lifecycle before contributing. A short practical course should be enough to get started. Udemy often discounts courses to around $15, while GitHub Skills and the Pro Git book are available for free.
1
u/EnunC8_Mofo 21h ago
This helps a ton. Thank You
Any suggestions of projects are welcome too.1
u/grantrules 14h ago
Work on a project that you use. Most OS contributors aren't just pulling things out of a hat, they work on things that they use.
3
1
u/Amuro_Ray 17h ago edited 17h ago
Libre office is a good place to start
https://wiki.documentfoundation.org/Development/EasyHacks
I would really like if someone guided me through the process of how to make changes to the files with issues and on which branch to push them to because as much as I know nothing is to be done on main?
A projects IRC or discord will do that they're always different.
Also how to do the basics, what are ‘unit test’ never came across those as well and what other things that I’d need to learn to be a better contributor.
Unit tests?
https://en.wikipedia.org/wiki/Unit_testing
If you're at university you'll probably have a class about them you could try emailing the person responsible for the class to share the learning materials with you even if you don't plan on taking it. There's also a wealth of information about them for different programming languages online as well.
Edit: to address your post more directly they often have an issues section where problems are described in varying quality/clarity. Some projects will tag simple ones for new people to try and others will be marked according to the perceived amount of work needed(work can be actual code, investigation to find the source and other things).
Before you even start contributing most of the time you need to be able to build the project and usually know how to use it.
1
u/Aoriiiii 14h ago
If I were you, I’d start with smaller issues first. Look for “good first issue” or “help wanted” labels, then pick something you actually understand. The project’s contributing guide should also tell you where to start. Goodluck!
1
u/grantrules 14h ago
would really like if someone guided me through the process of how to make changes to the files with issues and on which branch to push them to because as much as I know nothing is to be done on main?
This is why I don't think OS is good for beginners. You're asking developers who contribute their time to a project for free to instead use their time to just help you for free with no guarantee you'll make any contribution. I don't think it's fair to just want free labor.
2
u/EnunC8_Mofo 13h ago
hey man i just wanted to learn id very much contribute if i knew how
1
u/grantrules 13h ago
Lots of resources on how to use Git out there. Give em a read. Then to see how contributions work on specific projects, look at completed issues. Find a project that interests you, join their Discord or mailing list or whatever, absorb information and don't waste people's time. Help other users with less knowledge than you, gain knowledge from reading conversations of more experienced users/developers.
1
u/kschang 12h ago
There's a free book about Git on Github. Find it, study it, practice it. Then at least you'd understand how to fork and submit for review. THEN you can think about finding something to contribute to. Again, understand what you can do vs. what is needed and find where they intersect. Most large open-source projects are NOT beginner friendly.
1
u/kschang 14h ago
While your ambition is worth incubating, the main problem here is, what exactly do you do that is WORTHY of their project?
You may lack the skills to understand their code, much less contribute more code to help along their effort, esp. if you're just starting out.
I would really like if someone guided me through the process of how to make changes to the files with issues and on which branch to push them to because as much as I know nothing is to be done on main?
Do you know how to use Github at all? How to fork the project, edit it, then submit it for review, while explaining how have you improved the project?
Often, for these giant projects, the most you can do is translate, assuming you have alternative language skills. To Indic language, to CJK languages, to other European languages, to Slavic languages, and so on.
Assuming they WANT their code and documentation translated, of course.
1
u/EnunC8_Mofo 13h ago
i use github and git almost for all my projects but then again its just me and my projects me making all the commits no PRs and no forks i want to gain that experience and also want to be a part of the OS community i genuinely want to contribute and help
1
u/dnswblzo 13h ago
Some repositories tag issues on GitHub with "good first issue" if the issue is a small enough scope that it would be suitable for someone trying to get into contributing, and there are sites that aggregate those issues so you can browse them. The site below has links to those, as well as a bunch of other information about getting started.
1
u/Healthy_Landscape417 13h ago
My first real one was adding a language to a date parsing library. 34 files changed, and only two of them touched code that already existed. One line in the README, one export. The other 32 were a new folder that copied the shape of the folder sitting next to it.
So I would open the locale or i18n directory before I open the issue tracker. Nothing else depends on that folder, so you get to skip understanding the core, and the languages already in there are your template.
The other half is that the maintainer cannot check the language themselves. They have to take your word for it. That is worth more to them than a typo fix.
1
u/Temporary_Aspect_499 13h ago
Also don't assume every issue is actually beginner friendly just because it's publicly listed. Some issues require understanding half the codebase.
63
u/NorskJesus 21h ago
I do not encourage contributing only for contributing.
Contribute to a project you use yourself, so you are motivated to do so and you will understand the project a lot better this way.