How To Get Started With Open Source

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you're looking to level up as a developer then open source software is one of the best ways to do that but getting started with open source is really difficult so in this video i'm going to show you step by step exactly how to get started with open source software let's get started now welcome back to web dev simplified my name is kyle and my job is to simplify the web for you so you can start building your dream project sooner so if that sounds interesting make sure you subscribe to the channel for more videos just like this now before we get started the very first thing that i want to mention is that you're going to need to have a github account created so if you haven't already created a github account just go to github.com sign up for an account then you can get started where we are now and also you're going to need to connect that github account to your local environment your local computer and i have an entire video showing you how to do that step by step which i'm going to have linked in the cards so if you haven't already connected github to your own computer make sure to check out that video it'll show you exactly how to do it then you can come back here that video is also going to explain all the complex topics around git itself which is perfect because you're going to need to understand that to contribute to open source software once you create an account or sign in to your already existing account you're going to be brought to this home page here which is just your recent activities mine's pretty populated because i have a ton of projects created but yours if you just create an account is most likely going to be empty and what you need to do when you first get started into open source software is think about what you want to contribute in if you're a javascript developer for example maybe think about different javascript libraries that you use that you'd like to contribute towards or if you work in python for example think about python libraries that you like essentially just thinking about libraries that are open source that you use all the time and that you enjoy those are great starting places it is also generally a good idea to go with larger libraries and projects if you can to get started because they're going to have a much larger community of people that can help you out along the way because it can be difficult when you're first getting started and it can be discouraging so having a large group of people there to help you out and encourage you along the way is really helpful also if you don't really have any libraries that you'd like to use just search for different topics such as you know typing in machine learning for example if you're interested in machine learning and try to find big popular libraries around this that you can contribute to but more than likely there are certain libraries that you use on your own that you'd like to contribute to this example we're just going to be using react because react is a massive library here we go by facebook tons of people use it and it's something that is open source so that you can contribute to it and whenever you're going to contribute to a project the very first thing that i like to look for is going to be the contributing guidelines essentially the rules around contributing and generally this is going to be instead of a file called contributing.md this is going to be all the rules around contributing but if you don't see this contributing.md file generally if you scroll down a little further you're going to see this thing called the readme and the readme is just information about the library itself as you can see they have installation documentation and so on examples and generally towards the very bottom of this you're going to find a section called contributing or development or something like that this is going to have all the rules around how to contribute how to download the code to get started and so on so inside of here you can see they have a code of conduct which is essentially the rules around how people communicate to make sure it's a very welcoming and friendly environment and then they have the contributing guide if i just click on this it goes into details exactly how to contribute to every single part of the react ecosystem generally if you're contributing to a larger project there's going to be a lot of stuff to read through on your very first pull request as you can see this is a ton of stuff to read through so that may be intimidating but really these are just rules that are set in place to help you along the way of making your first pull request and your first change generally this just walks you through the process of how to build your environment how to work on the code how you need to set up your changes and so on and we're going to go through all of that but since react is such a big and popular library i don't really want to spam them with a pull request that doesn't mean anything for this example video so i actually created just a really dummy example here that just has a single readme file and as you can see there's a typo inside this readme file this is what we're going to be using for our example and our use case of creating a pull request and doing our first open source contribution but when you're on a project like react and let's say you do want to contribute to react a great place to go when you're working on a project is this issues tab this is going to be all of the problems inside of the environment essentially these are issues whether they're new features bugs and so on that they want to have fixed inside of reactor added to react and if you go through here you can see exactly the title of it there's different labels for each one of these and generally when you're on a larger project there's going to be a label for something like first time issue or good first issue or something like that so if you click on this labels tab right here when that loads up you can scroll through and eventually if you just look through these you should hopefully see something along the lines of good first issue right here we have good first issue if you click on this it's going to bring you to all of the issues that have that tag and this is great when you're just getting started is if you can find something like good first issue or first issue or something like that it's essentially an issue that the developers have noted as being something that's really beginner friendly it's generally a small task that is good for getting started with so you could click on one of these as you can see we'll click on it here to load up at the very top it has a description that the person left for what the issue is and then there's comments down here of people discussing the issue back and forth as you can see there's quite a few comments on here and you can read through these comments read through the issue and then you can get started developing the code yourself but how exactly do you go about developing the code for yourself because as you can see we have the issue we have all the comments we have all this information we have the documentation the guidelines but how do we go about making changes to the code this is something that really confused me when i got started in open source what you need to do we'll just use this example here essentially what you need to do is click this fork button over here what fork is going to do is it's going to create a copy of all of the code inside of this repository and add it to your own github account because right now this is on this wds oss example account that i just randomly created we want to put this on our own account which is my web dev simplified account so if we click this fork button this is going to load up this page here and as you can see it says web dev simplified oss and this is my own personal account and it's going to say it's forked from wds oss example this is the account or the uh repo that we forked this from essentially we copied all of the code in this repository and added it to our own personal account because that way we can make changes to it on our own account so now what we need to do is actually copy this code down to our own local environment on our computer so that we can make these changes so if we click this code button here it might say clone or download you'll see we have options here and we're just going to use ssh and we just need to click this copy button here once we click that it copies this url so we can clone the code down to our local environment if we just click this minus button here we have visual studio code open essentially you can use any editor that you want to use it really doesn't matter i just have visual studio code open i'm going to open up the terminal here and once that loads i can type in git clone and then paste in the url that we copied this is the url that directs to our repository that we just created by forking the old repository if i click enter and let this run you can see it copied all those files into this oss example and then we have this readme right here where we need to update this to be spelled correctly so i'm just going to change my directory to be inside this oss example by just typing cd oss example that way i'm inside of the directory so i have access to git inside of here and now all i need to do is just make some changes for example i could just say type in just here click save now i've made these changes and i need to commit these changes and generally you want to do this on a new branch so we're going to create a branch by just saying git checkout dash b that's going to create a new branch and we're just going to call it fix typo that's the name of our branch now we have this new branch that has this code that we just changed and now we need to add and commit this code so we'll type in git add and we're gonna put the period here that just adds all of our files and we're gonna say git commit dash m that's to say a message and then inside of these quotes here we're going to type out our message which is just going to say fixed a typo hit enter and there we go we've committed our changes we've added our changes now all we need to do is push our changes up so we can just say git push and you'll notice immediately we get an error it says the current branch fix typo has no upstream branch to fix push the current branch and set the remote as upstream use this command we just need to copy this paste this and run it and the reason for this is we have this branch we just created called fix typo but on github there is no branch called fixed typo so we just told github to create a branch called fix typo and connect it with our own local code so now once we've made our changes we added them we committed them we pushed them up in their own branch we can go back to github so let me just minimize out of here and if we go back to github you can see it says fix typo had recent pushes less than a minute ago essentially we created a new branch and made changes to it recently we can click compare and pull request if you don't see this have showing up for some reason this doesn't show up and maybe you pushed your changes and came back a few days later this won't be here you can click pull request here and you can create a new pull request manually like this if you want and just choose the correct base and head repository in our case we're just going to use this compare and pull request button because it does it all for us and you're going to see something interesting here it has the base repository as wds oss example so this is the original version this would be like react itself and then here our head repository is our own local copy of this repository so this would be like our own local copy of react and this right here is the actual public version of react itself that we're pushing to in our case it's just this example repository but you can imagine it just like react so we're pushing up to this main branch here and for us we're pushing our fixed typo branch which contains our changes to the main branch here and then what you want to do here is leave a comment and when you get to the contributing guidelines of the documentation you're using for react for example it's probably going to tell you exactly how to write out these comments it's going to tell you things like including screenshots including before and afters and so on in our case we're just going to say fixed read me typo because it's pretty self-explanatory what the changes were but generally you want to go into much more detail here and then if you scroll down a little further you'll notice down here it shows all of the changes that we made you can see we just changed this miscorrectly spelled word into the correctly spelled version and that's it and once we're done and we think all of our changes are good we can click create pull requests we just click this button right here you're going to see it load for a second and you're going to notice we get brought to the actual version here the wds oss example version that we copied from and it has a new pull request so essentially we made changes we created our own local copy of this repository we made changes to it we pushed those changes up and then we created a pull request which is essentially saying i made changes here they are do you accept them or decline them now i have these changes set up here so the person that owns this repository can now either accept or decline the changes that i've made and you can see here we have files changed where they can see all the different files that have changed we have our conversations tab and this is just like in react you can see react has 121 current pull requests and if we just look at one of the more recent ones let this load for a second you can see that there's 17 files that are changed you can look at all the changes in each of the files and you can see the conversation around this to see exactly what the changes are in our case it's just a much more simple example our conversation is very short files change is very short so now what is the next step once you do this because this is where most people stop they create their first pull request and then they're done what happens next how does it work from the maintainer perspective luckily i have my account this wds oss logged in on a different tab as we can see here i'm now logged in as the person that owns this repository i am the maintainer for this repository if i just refresh you'll notice there's a new pull request i can go access this click on it to open it up and now i'm the person that maintains this project i'm signed in as the person that owns this project and you can see here i have the option to merge this pull request which is going to take all these changes that we created earlier and it's going to merge them into the actual real code base or i could leave a comment for example i could say can you add more to the readme i could click comment if we just come over here go back to our other example you can see there's a comment that says can you add more to the readme and we could go back down to our code we could make more changes to our code push it up update our pull request and go back and forth a bunch of times but eventually it's going to get to the point where your code is either going to get accepted or it's going to get closed essentially declined so let's take a look at what an acceptance would look like if we just go back to our other tab here we can just click this merge pull request button this is what happens when the owner of the repository accepts your changes and merges them will confirm that merge now if we just give it a second to load here you can see that this pull request has been marked as merged it no longer shows up in the list and if we go to our code you can see that that typo is now fixed because it was merged into the main branch essentially the master branch of the code and that's all it takes to create your very first pull request into open source software if you enjoyed this video make sure to check out my other videos linked over here and subscribe to the channel for more videos just like this thank you very much for watching and have a good day
Info
Channel: Web Dev Simplified
Views: 31,692
Rating: 4.9513006 out of 5
Keywords: webdevsimplified, open source software, hacktoberfest, how to contribute to open source software, oss, contribute to oss, open source software beginner, open source software first, oss first, guide to open source software, guide to oss, how to open source, contribute to open source, how to contribute to oss, how to contribute to open source, what is open source software, what is open source, what is oss, contribute to software, open source is for everyone, open source, javascript
Id: GbqSvJs-6W4
Channel Id: undefined
Length: 13min 3sec (783 seconds)
Published: Tue Nov 03 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.