1 00:00:01,250 --> 00:00:07,670 In this video we're going to talk about how to contribute to open source and actually take you through 2 00:00:07,670 --> 00:00:17,410 the steps but first for those who don't know what is open source well a lot of technology that has been 3 00:00:17,410 --> 00:00:25,000 created on the Internet that we know today has been built on top of open source projects and open source 4 00:00:25,000 --> 00:00:29,140 projects means that anybody can view the code. 5 00:00:29,140 --> 00:00:36,860 Anybody can see the code of a program can inspected can modify it can enhance it in this way. 6 00:00:36,880 --> 00:00:43,180 The idea is that by sharing this information with everybody we get everybody's input and we use the 7 00:00:43,180 --> 00:00:46,570 collective mind to improve software. 8 00:00:46,840 --> 00:00:50,230 Not only that but it also benefits everybody. 9 00:00:50,230 --> 00:00:51,200 Right. 10 00:00:51,400 --> 00:00:59,320 For example the most famous example of an open source project is Linux an operating system just like 11 00:00:59,320 --> 00:01:11,170 Windows or Mac OS except it's built by everyday programmers and it's code that is completely open sourced. 12 00:01:11,170 --> 00:01:19,680 Anybody can inspect the code add onto it and it's become so successful that most of the cloud that we 13 00:01:19,680 --> 00:01:28,280 know of the servers usually run Linux a W S Google Cloud Microsoft Azure. 14 00:01:28,590 --> 00:01:31,250 All of them use Linux. 15 00:01:31,300 --> 00:01:38,710 Some of you might be running Linux right now as you watch this video so not only do you get to work 16 00:01:38,710 --> 00:01:44,440 with other developers from around the world where you can build great projects but just working in teams 17 00:01:45,040 --> 00:01:51,970 by learning how open source works well you don't have to create something as big as Linux. 18 00:01:52,000 --> 00:01:54,240 You can create a project with a friend. 19 00:01:54,310 --> 00:01:58,110 Something very small and simple it doesn't really matter. 20 00:01:58,120 --> 00:02:07,640 The idea is of collaboration of openness and sharing code to hopefully improve on the collective knowledge. 21 00:02:07,730 --> 00:02:15,150 Finally a lot of employers actually look upon open source contribution as a plus so if you're able to 22 00:02:15,150 --> 00:02:20,520 put in your resumé that you're an open source contributor Well that's a good sign. 23 00:02:20,580 --> 00:02:26,310 Plus it teaches you valuable skills at using get and get hub to work in teams. 24 00:02:26,310 --> 00:02:31,890 If you're looking for job experience but you don't have a job contributing to open source is the perfect 25 00:02:31,890 --> 00:02:37,650 way for you to learn how to work in teams and mimic a work like scenario. 26 00:02:37,650 --> 00:02:41,370 This is a really important video and something I'm really excited about. 27 00:02:41,610 --> 00:02:47,330 So let's show you how to make your first open source contribution improve your resume. 28 00:02:47,430 --> 00:02:51,340 Learn some real life skills and have fun along the way. 29 00:02:53,060 --> 00:02:59,520 Now we've actually created some open source projects for you for this course. 30 00:02:59,530 --> 00:03:06,400 We have the 0 2 mastery repository here where we can see that we have about 64 projects open right now 31 00:03:06,730 --> 00:03:09,450 with about 2000 contributors. 32 00:03:09,460 --> 00:03:12,880 That's a lot of people in this numbers bound to increase. 33 00:03:12,880 --> 00:03:18,730 Now this place was created as a practice ground for you a playground. 34 00:03:18,940 --> 00:03:25,600 Nobody will yell at you if you break things you can contribute at silly things whatever you want. 35 00:03:25,600 --> 00:03:27,120 It's a testing ground. 36 00:03:27,130 --> 00:03:32,410 The idea is to have as much fun as possible and make it as easy as possible to contribute to open source 37 00:03:34,690 --> 00:03:36,520 now within that organization. 38 00:03:36,520 --> 00:03:42,610 We have a great community of administrator or management team that will help you with these open source 39 00:03:42,880 --> 00:03:45,070 projects by the way. 40 00:03:45,070 --> 00:03:47,100 Who are these administrators. 41 00:03:47,160 --> 00:03:48,340 They're right here. 42 00:03:48,440 --> 00:03:49,160 Ignore my name. 43 00:03:49,430 --> 00:03:56,930 I help out as well but they do a lot of the heavy lifting and they are past students just like you that 44 00:03:57,110 --> 00:03:58,610 have had a bit of experience. 45 00:03:58,610 --> 00:04:06,860 Now most of them are working full time but they are now helping out the community by helping with our 46 00:04:06,860 --> 00:04:11,840 open source projects are discord and generally just helping our community grow. 47 00:04:12,380 --> 00:04:15,020 So shout out to them if you get a chance. 48 00:04:15,050 --> 00:04:16,840 Say hi to them on this court. 49 00:04:16,850 --> 00:04:21,210 They definitely do a lot for this community. 50 00:04:21,230 --> 00:04:26,330 They're very active on discord and they really help maintain all of our open source projects. 51 00:04:27,530 --> 00:04:32,780 So let's learn how to make our very first open source contribution. 52 00:04:32,780 --> 00:04:37,560 I do want to note here that this isn't the only way for you to contribute to open source. 53 00:04:37,580 --> 00:04:40,570 This is just a playground that we've created for you. 54 00:04:40,640 --> 00:04:46,520 But once you contribute here you can go off and contribute to all the other open source projects all 55 00:04:46,520 --> 00:04:47,180 over GitHub. 56 00:04:47,180 --> 00:04:51,820 They can find you can contribute to projects like react and angular. 57 00:04:51,890 --> 00:04:58,580 The world is your oyster or you can just stick to these as we actually have a ton of projects here that 58 00:04:58,580 --> 00:04:59,390 are fun. 59 00:04:59,420 --> 00:05:02,330 We have events going on like October fest. 60 00:05:02,330 --> 00:05:04,720 Well we'll get to that shortly. 61 00:05:04,730 --> 00:05:08,750 We definitely have a great community of developers and we can create some awesome projects together. 62 00:05:10,130 --> 00:05:14,960 Now the way you want to get started is to first go to the start here guidelines 63 00:05:17,600 --> 00:05:25,430 now in the start here guidelines and I'll link to this page you actually have a four step guide to get 64 00:05:25,430 --> 00:05:26,480 started. 65 00:05:26,480 --> 00:05:33,230 The first thing you want to do is to actually watch the guide started guideline a fellow student actually 66 00:05:33,230 --> 00:05:38,600 created this guide for you to follow the steps that I'll mention in this video. 67 00:05:38,720 --> 00:05:41,000 So you always have this as a reference. 68 00:05:41,060 --> 00:05:47,690 So after this video definitely check out this document as a reference but otherwise once you've browsed 69 00:05:47,810 --> 00:05:52,210 through the document is will make your first pull request. 70 00:05:52,280 --> 00:05:57,500 So if you've already watched might get and get hub videos you should be all set. 71 00:05:57,530 --> 00:06:00,210 Otherwise hopefully you're familiar with get and get out. 72 00:06:00,620 --> 00:06:08,530 Now the first thing we want to do is to actually add our names to the contributors dot and define in 73 00:06:08,530 --> 00:06:09,560 this project. 74 00:06:09,610 --> 00:06:15,850 So if you go up you'll see that we have 8 contributors dot M.D. which stands for markdown file and if 75 00:06:15,850 --> 00:06:22,150 I click on here you see that all the contributors that we have we have over a thousand contributors 76 00:06:22,450 --> 00:06:26,140 and if you scroll down these are all their github names. 77 00:06:26,290 --> 00:06:30,690 So your first task is to actually add your name to this list. 78 00:06:30,760 --> 00:06:32,950 So how can we do this. 79 00:06:33,070 --> 00:06:41,530 Well we can just clone this repository but a more recommended way of usually contributing to open source 80 00:06:41,830 --> 00:06:50,140 is to fork the project fork essentially means copy over the entire project and put it on your own get 81 00:06:50,140 --> 00:06:51,690 hub profile. 82 00:06:51,730 --> 00:06:57,640 So if I click fork here and we see over here that you can select where you want to forth the project 83 00:06:57,700 --> 00:07:04,580 and you want to select your profile so once we fork this project we make a copy of it. 84 00:07:04,600 --> 00:07:10,960 It's like we own this repository now with our own version of the start here guidelines. 85 00:07:10,960 --> 00:07:18,420 So once we have this we can clone this repository using SSA H or H2 G.P.S. whatever you prefer. 86 00:07:18,460 --> 00:07:27,090 In my case I'll use SSA so that I don't have to use my password every time I can now say get clone and 87 00:07:27,090 --> 00:07:29,610 clone this repository. 88 00:07:29,640 --> 00:07:39,570 Now we can see these into start here guidelines and we can't open this up in our favorite text editor. 89 00:07:39,720 --> 00:07:43,620 Now once here let's clear this. 90 00:07:43,730 --> 00:07:49,460 We have the contributors file which we need to add our name to. 91 00:07:49,470 --> 00:07:54,800 Now I can see here the contributors file is getting quite long because while we've had a lot of students 92 00:07:54,800 --> 00:07:58,650 who are contributing to open source but at the very end. 93 00:07:58,650 --> 00:08:00,490 Make sure you're at the very end here. 94 00:08:00,570 --> 00:08:02,850 You want to add your own name. 95 00:08:03,940 --> 00:08:05,500 Now here's the thing. 96 00:08:05,500 --> 00:08:11,500 Right now we're on the master branch but I'm going to show you what a good practice is. 97 00:08:11,560 --> 00:08:19,300 We have our forked project and we want to create a new branch to work off of instead of master by saying 98 00:08:19,300 --> 00:08:28,930 get check out dash B to create a new branch and we want to name this branch in our case let's just name 99 00:08:28,930 --> 00:08:29,910 it test. 100 00:08:30,390 --> 00:08:39,220 If I hit enter you'll see that now I'm on a new branch called test and in this branch I can add my name 101 00:08:39,220 --> 00:08:41,100 to this contributor list. 102 00:08:41,350 --> 00:08:44,880 In your case you'll want to use your own GitHub profile. 103 00:08:45,100 --> 00:08:52,330 So we're using markdown here which is a way a syntax to write and has some functionality. 104 00:08:52,330 --> 00:09:00,880 For example if we go to the contributors list you'll notice that they are all clickable links. 105 00:09:00,880 --> 00:09:09,220 So we essentially use the same notation we do a dash square brackets with your get hub user name and 106 00:09:09,220 --> 00:09:15,080 then in the parentheses we just have the actual U.R.L. that you want to link to. 107 00:09:15,400 --> 00:09:18,430 In our case the get hub user name that you have. 108 00:09:18,520 --> 00:09:20,220 So you'll get hub user name here. 109 00:09:20,290 --> 00:09:22,120 Get hub user name here. 110 00:09:22,330 --> 00:09:25,970 Once we do that we can save this file. 111 00:09:25,990 --> 00:09:34,950 Now go back to our terminal and say get status and we see here that yeah we just modified our contributors 112 00:09:34,960 --> 00:09:44,040 dot DFA and if I do get def to see any changes that we've made we see that we've added this new line 113 00:09:45,240 --> 00:09:47,960 so let's clear this. 114 00:09:48,130 --> 00:09:55,330 We have our name all set up and we can now add this commit by saying get ad and dot for everything we'll 115 00:09:55,330 --> 00:10:04,870 add everything and then get commit and we'll write a message that says added my name to contributor 116 00:10:05,470 --> 00:10:08,400 list. 117 00:10:08,430 --> 00:10:10,270 There we go. 118 00:10:10,280 --> 00:10:14,460 So now it's time for us to push these changes. 119 00:10:14,540 --> 00:10:25,060 Now if I do get push origin master well right now what that would mean is that we want to push to origin 120 00:10:25,360 --> 00:10:29,900 and the origin is this start here. 121 00:10:29,900 --> 00:10:36,690 Guideline which I fought so the origin is actually my version of the project and if I want to push to 122 00:10:36,690 --> 00:10:39,380 master that is the main branch. 123 00:10:39,600 --> 00:10:50,880 But we don't want to do that because ideally we want to be able to also change and add our name to the 124 00:10:50,880 --> 00:10:57,760 original 0 2 mastery start here guideline because this is the main. 125 00:10:57,910 --> 00:11:08,360 So what we can do is instead of master push to our test branch so we say get push origin test. 126 00:11:08,590 --> 00:11:09,070 There we go. 127 00:11:10,000 --> 00:11:20,850 Now if I go back here and go to my project and I refreshed I now have two branches the master branch 128 00:11:20,880 --> 00:11:26,080 and also the test branch which I just updated. 129 00:11:26,100 --> 00:11:30,780 So one way to do this is to click on new poll request 130 00:11:35,130 --> 00:11:46,740 and you can add comments here like I've added my name to the list and you can tag some of our maintainers. 131 00:11:46,740 --> 00:11:50,280 In my case I'll just tag myself if I do create pull request 132 00:11:54,220 --> 00:12:03,700 I now have my poor request and notice here how my poor request is now at the 0 2 mastery star here guideline 133 00:12:04,630 --> 00:12:14,390 so that if I go back to our star here guideline I see that I'm part of the pull request now right here 134 00:12:15,600 --> 00:12:21,150 and because I've tagged one of the management teams so in this case it was myself. 135 00:12:21,160 --> 00:12:25,000 Or we can tag any of the management team that we have now. 136 00:12:25,100 --> 00:12:32,840 In this case I'm cheating because I also help manage this so I can just myself merge the poor request 137 00:12:32,900 --> 00:12:36,200 most likely in your case you won't be able to merge it yourself. 138 00:12:36,650 --> 00:12:42,350 But if I click merge and confirm. 139 00:12:42,590 --> 00:12:43,220 There we go. 140 00:12:43,230 --> 00:12:45,340 I've merged my project. 141 00:12:45,530 --> 00:12:50,420 I've deleted the branch and the pull request is closed. 142 00:12:50,480 --> 00:12:53,870 If I want I can even delete my own fork. 143 00:12:53,900 --> 00:12:56,340 But for now let's keep it the way it is. 144 00:12:56,390 --> 00:13:02,200 Let's check the start here guidelines and see if my name has been added to the list. 145 00:13:02,290 --> 00:13:04,940 I scroll all the way down. 146 00:13:05,000 --> 00:13:06,450 Hey check that out. 147 00:13:06,560 --> 00:13:08,830 There's my name on the list. 148 00:13:08,870 --> 00:13:11,860 So I've been added to the contributors list. 149 00:13:11,870 --> 00:13:13,240 It was pretty easy right. 150 00:13:13,490 --> 00:13:23,040 And the cool part is that now if I go to my profile I actually have zero to mastery as one of my organizations. 151 00:13:23,050 --> 00:13:30,670 So if you're able to add yourself to the contributors list you can actually join the 0 2 mastery organization 152 00:13:30,850 --> 00:13:34,600 and have this little icon appear on your get hub profile. 153 00:13:34,990 --> 00:13:37,780 And lots of get tough profiles have organization. 154 00:13:37,780 --> 00:13:41,810 So people usually have their workplace icon in here. 155 00:13:41,890 --> 00:13:46,870 So just a nice little thing to have on your profile to show that you're involved in the programming 156 00:13:46,870 --> 00:13:47,410 community 157 00:13:50,370 --> 00:13:54,810 so we've just made a poor request which is step two. 158 00:13:54,810 --> 00:13:57,380 And that was pretty fast right. 159 00:13:57,420 --> 00:14:04,110 Finally the next step is to go join an actual project and start contributing the way we just learned 160 00:14:04,770 --> 00:14:07,990 in our 0 2 mastery organization. 161 00:14:08,010 --> 00:14:14,580 Now there's actually a guy that we provide for you to figure out what project you choose what's going 162 00:14:14,580 --> 00:14:16,190 to be good for you. 163 00:14:16,200 --> 00:14:18,160 We also have an hour discord. 164 00:14:18,210 --> 00:14:26,130 A group projects section where we can look at some of the current projects that are happening or you 165 00:14:26,130 --> 00:14:34,400 can just go to the 0 2 mastery organization and pick any of the repositories to contribute to. 166 00:14:34,470 --> 00:14:40,800 Now in the next video we're going to contribute to one of these projects and show you a real life scenario 167 00:14:42,000 --> 00:14:43,430 I'll see in that one.