How to contribute to Open Source? | Github | Tech Primers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
when I started coding a decade ago there was no concept of git or github and there was no concept of open source everything was enterprise software and you cannot come back home and do the same thing which you want to do at work over a period of time systems have evolved computers have evolved and we are seeing new transition from enterprise software's to open source software's and lots of people have open source software contribution as their full-time job I used to wonder how is it going to scale but looking at communities like kubernetes where there are thousands of contributors across the globe into a single platform I can see how open-source as a concept and with respect to community contribution has created powerful products which V developers can leverage upon in this video we are going to see how we can contribute to an open source project which is present inside github let's get started press the bell icon on the UT o path and never miss any update from tech primers few days ago I had posted saying that I have created a tech primers github page let's say your account name is Ted primers github provides something called your account name dot github dot you so I get a space provided by github called tech primers dot github dot this is a space educated for my username so if let's say I have a username called moving to web I have a moving to web dot github got a Oh same way every user with a username gets a github page and you can host some HTML pages inside that and the source code for that will reside inside your github account so if you notice this is my github page most of you are familiar with this and you are using this particular github account if you go to tech primers github that I oh this has the source code of whatever you see here so I have created a dummy page or I have created a sample page with which you can feel the power of open source by contributing to it so I have this open sourced this host tech primers github dot you can go and add your name with a page so see that I already have two contributors one is uncor and then so but they have added their own page so this whole content is added by them right and it is rendered in the same page which I have so if I see Subash has contributed today and Angkor has contributed two days ago and of course this is my profile so this is just a temporary page it just shows a bio about each one of you who have contributed to this particular page I have just created this particular page just for you guys to contribute it so that you can get a feel of how open source looks like right I'm going to explain it to you right now on how to contribute it and I am going to use an account to show you how you can really contribute to this particular project so if you have never contributed to open source this is your chance to contribute by creating a simple markdown file and then trying out your hand at open source projects that if let's say you want to contribute to bigger projects this is how it will feel like so there are a bunch of icons here these are just some icons which I have created so that he can take a look at how many people have forked how many people have starred how many contributions are there in this particular report and there is something called open end get bought so if you have seen my video on get put get bored as a online editor for github repositories so you can use git pod to edit it online without even having to check this code look I just created an account called the spike account this is the dummy account which we are going to use before cover take primers dot github that i generally when you want to contribute to an open-source project you will have two for karuppu so you cannot check out this particular code directly and you cannot directly raised upon request because you might not have access to this particular organization or a github account so what you can generally do is you can fork it and that's why you see lots of people forking it for King will allow you to get a branch of what is there inside the root account and then you can work on that particular version and then you can raise a pulled request on to the master version right so that's what we are going to do so I am going to click on the fork option the moment you click on the folk option it creates the same copy from the tech primers account on to my account see that there is a spike account this is my account and internally we have got the same code here and this is how you can create a copy of what is present inside tech primers into the spike account and that's what we got here it's just showing of the spike now how do I contribute to this particular F Prime has open source project this particular open source repo the github page can be contributed by adding a markdown file that's it so you if you have seen my videos on Hugo this whole website is created using Hugo so you write markdown files and that gets converted into this particular website using the theme called pulp which is present inside the Hugo framework so we can build the project using Hugo I am going to show that how to do it and you can commit those code along with the markdown file so now that we have got the fork ready so you can for every any repo now the fork is ready right we need to check out this particular fork on to our local most of the time you can edit it here as well but I want to compile my Hugo code as well I already have the code here which I used for the tech primers account but I'm gonna ditch this and I'm going to use mine Spyke account so what I will do is I'll just create a new repo so inside code I think I have a commands and code inside this I'm going to create a directly called spike here I'm going to clone my project and how do I clone it I'm gonna clone it using my spike account so the spike account is it's called spike ACC right so the moment I enter and username pad github.com it's gonna ask me the password and I didn't enter the clone command obviously the command flop cloning is git clone so this is how you clone it I can do the clone so this will clone the whole repo into my local right so this has cloned my whole rap oh into this locker that's what we have done here and I also have documented the whole steps see this this have you clone it you can directly clone the github link of your repo right I have cloned it into my spike account red apple right and then you can do a sub-module in it and sub-model update I'll tell you in a while what is that let me go to the tech promotion kit and what are you so get sub mode you need in it and get sub module point it so what are these doing these are checking out the pulp theme into my local see that it says that it has checked out the pulp theme on to my themes folder so this is required because you need to compile the code handling the run thing you need to generate these public folders right so I'm writing a markdown file but I need to generate the HTML code out of it right that's what the Hugo does and pulp theme is the UI layout whatever we see in this particular website here so this is what the pin is all about and that's what we are going to do so we have the code ready I'm going to open this in intelligent is open in IntelliJ let me go to the content so this should have the contributor details see that the different contributors are present I am going to create exactly similar to what encore has created let me create a spike account right so my account is called spike so I'm just going to create a spike later I can remove it just for you guys to see how I can contribute so I'm just going to say hello wall this is the spike commit for the open source contribution demo that's what we are doing here so that's it this is what I expected to be added to this particular website right so I just added a profile using a markdown file and I am done but the only caveat here is you need to build this particular project because you greater the markdown file however all the history ml files gets generated into a folder called public right now all the changes are not reflected in the public right so in order to do that you need to build a hugo site so in order to build it how do you build it you can just do if you go the moment you type Hugo this gets built the whole website gets built and if you look at the intelligent see that there are new changes now so these are some things which got changed lately if I open the index dot HTML I can now see the link for the new changes which got added alright where is that let me go to contributors there should be a new contributor see that there's a new contributor called spike so we need to add all these right so that's what I'm going to do now I need to commit this back right I'll do a gate and and I'll do a git commit so we have added the markdown file they are built using Hugo and now we are committing them back so I'm just saying some commit statement this has committed now the moment I come at it I need to push it right the moment I push this is going to ask the user name it's since I already provided the user name it's going to ask me the password alone so now I need to enter the pass let me enter the password so this is the password for my spike account the moment I do this the code is now pushed on to my spike let's look at the github account because we cloned it from our spike account right so that's what we did now it's taking the latest changes and see that this is what we added we had at the new spike dot MD and this got added right let me go back and it has no change right so you were able to add it because it's all in your website now I need to push the local change whatever I added here on to the next I must root account and that's what we need to do that's why we need to raise something called as a pulled records so pull requests are basically you are pulling the changes from the spike account and add it on to the tech primers account so the moment I click on the pull up new pull request github is intelligent to identify what are the changes which are present inside the spike and then it raises the diff of that and it raises on to a primers directly so the moment I say create this pull request and say create pull request in my tech primers account here when wherever I am logged in I will get a notification saying and new pull request has been raised by Spike see that I can see the new pull request and it shows up for is red spike account raised it right this is how you can raise a pull request from your account on to the ik promise account and that is how you can locally add changes on to open source projects so this is general concept in any project here we just did the Hugo build button generally you will try to change the source code and you will try to run some test cases or try to build it locally and test it locally as well in case if you want to test this particular Hugo project locally you can run the command called Huber's so - Dee the moment you do it you can hit your URL locally see that I can hit my you are locally using localhost colon one three one three slash of length and I can see the whole website locally and I can see the new change as well yeah so you can test the site locally and then make sure you can contribute it back so if you are interested in contribution definitely go ahead and that up oh and then create a pull request once you have changed it I hope you were able to easily understand how to for karuppu and create pulled requests based on the changes you have made for this particular open source project so this is the general concept for any open source project if you have never done any open source contribution definitely try testing with the tech primers dot github but I so I am definitely going to review all your changes and I will approve it they already have to hold request raised by two different contributors from the channel so one was done by Subash the other one was done by encore thank you very much guys so if you want to contribute do form the repo and try to raise the pull request the moment you add your mountainside even if you don't know how to build the hugo side let me know i can build it for you and i will just come at your markdown files i hope this was pretty useful as always if you like the media of god and like it if you haven't subscribed to the channel go to and subscribe to it later again in the next video thank you very much [Music]
Info
Channel: Tech Primers
Views: 17,566
Rating: undefined out of 5
Keywords: techprimers, tech primers, open source, how to contribute to open source, how to contribute to github, how to raise fork, how to raise pull request, how to fork in github, github repo contribution, open source contribution, open source project, free open source project, github contribution, how to raise PR in github, PR in github, open source projects in github, how to contribute to github projects
Id: LvkRaIKX1L8
Channel Id: undefined
Length: 13min 48sec (828 seconds)
Published: Fri Jun 14 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.