Git Tutorial for Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] so what is gate now if you're new to programming or if we joined a company recently you might have heard about this temple is gate and in fact from last three to four years everyone is talking about this kit what exactly it is and why people is using it and how can we use it so I will try to answer all those questions in this particular video so welcome back aliens my name is Ivan ready and let's get started now git is created by leanest our world the guest retried is the same guy who has created Linux kernel now why he created another another technology called his gate so what happens you know when you talk about Linux kernel it's open source right and anyone can contribute so if you are living in it any way in the world you can contribute to the Linux kernel now what you can do you can you can download the copy of enough colonel you can add your own features and you can submit it there they will not accept your request by default but you have to provide some new features the important thing is you can be a contributor to Linux kernel ok so in this world we have millions of programmers right if everyone is trying to work on one software how they can manage it is it that easy to manage no it's damn difficult trust me even if you have 5 people working in a project it will be difficult for you to manage that project so what he came up with a concept called as gate Anton inked it it handles all those things of merging of different I mean merging of different source code from different people and maintaining versions so those those things are provided by gate so let's try to understand how it works and what is K now gate is actually a distributed version control system heavy words right so let's try to understand those words here now what happens is we have a concept of SC m now it's not only forget the positives there from a long time and I'm not talking about supply chain management here now SEM has lots of full form now this the the full form which we have to see here is called as software configuration manager or you can also use one offal from there which is called as source code management know what happens you know let's let's try to understand this let's say if you're working on a project right so if you are alone working on a project now at this point you will write some code right and of course when you get a requirement from someone you don't get take exact requirement what you get is the what you say a high level requirements what you will do is you will try to make a product a small product which is also called as a minimum value of product which is MVP now you will make a product which is not which will not have all the features and then you thought okay this is working you've got your first body what you say the first working software after some type you after some days you felt okay let's have some more features now what you're doing you are changing the same project and you're adding new features now okay now after adding new features you realize you know this new features don't are not working properly now what you will do you have to remove all the features right or maybe you have you when you when you should show this product to your client your client says ok with this new features are not that good for us so what you thought ok let's remove these let's remove all those features so from the first product you have added some new features and now you have removed the promote the features now that's after some time your client says hey you know those features which you have showed on that day dielectric is awesome now we want those features as well now what you will do you will again write the same code right but luckily if you have a backup normally we use to our box for the backup right so what you will do you will go to the Dropbox you will copy that code and you will push it again but don't you think you are doing lots of work and that too let's say you are done with that after some days you have added some more features you have removed some features and after doing all those things you realize you know the last version was better so what we normally do is to maintain all this version system we have a concept of version control example so let's say when you released your first product that will be a snapshot version after some time you thought ok this is the final version which you're going for so that will be 1.0 then after some time you will be saying 1.1 1.2 1.3 and it's in now you're working on 2.0 now what if you want the older project which is 1.2 is it possible so what we now we do is on Dropbox or maybe in your hard drive we will create multiple folders right which will have the backup of your project so you will name this photo like this you will be having 1.1 1.2 1.3 then 2.0 just imagine if your if you are the you have to handle all these projects and you have to remember bridge project has which features right you have to cater file there may be readme file or text file where you will write everything so y-you have to manage all those things you have a powerful tool here on a system which will do it for you and that is your version control systems okay now we can use any version control system right we can use we can use subversion we can use gate then why did using gate when you have subversion it's because earlier people used to work with centralized version systems and now they use distributed version systems okay what it means so if we talk about centralized one you will be having multiple computers or maybe you will be having one computer and you will be having one server so all your versions will be stored on this server so this is your machine you know your porn machine and this is the server so what you might do every time you write a code here and if you add new features the previous version will be stored on on this server right this is centralized system now what's the topic of this so drawback is you have a working copy that is perfectly fine but the version are maintained here right what if this server what if this hour fails what if you lose all your data from this server it may happen right we are living in a world of hikers and if anything is possible what if you are travelling somewhere and you don't have an internet connection maybe you are on a flight or maybe you are somewhere in a remote place where you don't have an internet connection how can you get this what how can you get the repository but that's a new term right depository is a place where you will have all your codes or you can imagine a folder and so right so if there is no network connection there will be an issue and there is a single point of failure if you if this server fails you will lose everything so what if if you have multiple machines normally what happens is if you are working for a company every computer project data will be stored on one server what if everyone can have their own copy right so we can create a copy of itself so we can have our copy so we'll be having a working copy and we will be having something called as a local repository so this is your local repository on the server we'll be having a remote repository now the advantage you have is even if your server phase that's fine you have a local copy right and you can literally your local copy to the server next time if your server fails now this time what we are doing is every machine or every developer has their own copy so this is called as distributed so we are distributing the repository so every machine will they have their own local repository now even if you're in flight or maybe if you're in some remote place if you don't have an internet connection that's fine you can work on your project and you can create different versions in your local repository and when you get the internet connection just push it on the server that will be awesome right and that is your distributed version control system so initially people used to work with centralized and now okay now does that mean we should only use distributed we should not use centralized see both have their merits and demerits let's not talk about that here but if you talk about get git is actually a distributed version control system okay so the first one distributed which means everyone will have their own copy which will have which will have a local repository and version control means it will do the version control for you okay is get that super it is like a Superman who will do everything for you not exactly because you have to as a programmer you have to control that okay it will help you to do that but you have to mention you have to use some commas like commit or push so while doing that it will maintain those versions okay so that's how it works but then what extra features it provides now there's also a concept called as trunk based development I don't know if you have heard about this before but we have a concept of trunk based development what it means let's say if you are working on a project or maybe if I am working on a project maybe an Android project and that project is buried so it is it is it is on development from a long time and the current version which you are working is let's say four point seven and four point seven is a stable watch and everything is perfect or not everything is perfect in this world we have we don't have any software which is bug free right so there will be some all other birds available in my system in my software then third which is one or four point seven and now we are working in a very new feature and that feature when it is added to the project it will be 5.0 right that's a major version now if you are working on 5.0 and make save some some of the users say it is a bug in yours in your current version which is 4.7 now what you will do will you work on 5 I mean you're working on 5.0 right you don't have a whole project now can you work on two projects simultaneously and it's possible what we do is if you are working on get let's say if you have a project here we feel working one kit and let's say if you are doing some work by default you will be having something less branch and that branch will be called as a master branch ok so let's say this is your 4.7 version and you are working here after some changes you have done the commit that means you are pushing your data to the local to the repository maybe local or remote after some changes again you are doing commit after some changes you are doing some commit now it is commit commit simply means save again we'll talk about commit in detail later this is a difference between commit and save but just imagine we have we are committing it now if you're coming from SQL by own you know what is cabbage right so yeah so we have we are saying a commit here but let's say this is your 4.7 version and now if you are working on 5.0 if you are working on 5 points you know on this same branch what will happen is you lose the original project okay so the best one would be don't work on the same branch if you are working on 5.0 what you can do is you can just create another branch that is possible you can create another branch which will which will name it as let's say branch okay so it's a new branch and all this branch you can have your 5.0 so you you're coding for 5.0 and after some time if you feel everything is perfect and by the time you're working on 5.0 you can still continue what what what worked with 4.7 now this is your master this is the actual one this is your new branch and the moment you feel you know 5.0 is perfectly working what you can do is you can push or you can send you can merge your you can merge your changes from this branch to the master branch and this very easily possible right so that's how you work with this system so we have we have a concept of trunk based development right we are creating branches to make it work now what else so this is your trunk based development but in Cochella is how would you implement all these things we can create up a local copy right so we can download get for free or it is free first of all it is free and open source or you can download the gate from the internet if you are using mac kongelige you already have get there but if you're using Linux you can install gate as USB domini installer the Sophos we're using package manager or if you are using windows we have git bash again I will show you those steps in the in the coming videos but then kahshanna is how we do get the remote version can I create my own remote repository that is possible right you can buy our server you can add your get service there but do we have to really buy those services we don't have to actually we have two different web in fact we have multiple implementations one of them is get up or we can use bitbucket we also have some GUI tools to work with them like we have so stre we have or we have different softwares I will talk about that once we start with the series so I will be using data for the implementation here but you can also try your luck on gate bitbucket right so their difference office available okay so what else so this is the basics of gate and we'll talk about the lots of features in the coming videos now once we have talked about the theory of gate it's time to implement gate right but the problem is how do we implement gate so first of all we need some software's to work with right now we talk about gate we can work with gate using command-line our favorite option right so what you can do is you can open CMD and you can search for gate or you can you can perform some commands here the moment you do that it gives you an either because you have not installed getting your system yet if you're a Mac user Congrats you already have gate with you but for Windows all falling ups we have to install it that's one way the another way of working with gate is by using some web-based get tools or get platforms so one of the famous get platform is github now if you have seen the video or if you have seen the title of the video you are sure that we are going to use github but then do we have other options or the time github can do something else now if you can see we have some more options as well we have gitlab and we also have big bucket so if I go to get lab in fact for let's let's explore the github first now as for the tagline I'd say is built for developers right so awesome platform where you can work you need an account here again even if you don't have an account you can actually search something here and you will find the source code of that okay what it says so from open source to business you can use you can use github anywhere from open source to big business and if you scroll down you can see some what options now if you click on pricing this is where you have a we have more interest right now good github is free but then why they have this price pricing scheme here so it says database free for of to use for public so if you are making open-source project where everyone can access that code and if you everyone can contribute of course you can go for github which is free but then let's say if you want if you are working on a project which is specific for a business you don't want to live in your source code then you can go for private repositories now for private you have to pay some amount right again this is not a big amount if you are actually working on a business project but then yet you have to pay for it do we have another option yes we have gitlab as we discussed if I click on get lab this is so get lab is a platform for modern developers now you can say there's a competition can you see that github says it is built for developers and get labs is a platform for modern developers then whether this extra term here I can get get lab is also famous and we have third option which is from Atlassian now all developers or programmers they know about Atlassian specially if you are from Jarrah world in fact from any world doesn't matter so Atlassian gives you lots of what you say a product for developers example we have JIRA we have we have some other tools as well example for for your kit itself we have so screen which is built by Atlassian and now they are also providing you get big bucket now big bucket is also a web-based kit where you can get all the things in fact they also have an optional pricing in fact in get ladder also you have pricing some value somewhere here you'll find the pricing scheme but you can see that get lab is used by most of this companies here in fact github is also used by most of the companies and same goes for big bucket so it says for small there are teams it is free and they also provide you free private repository so if you are thinking about making your own private repository you don't want to pay for it of course you can go for big bucket so we have guitar we have get lab and we have big bucket so we have lots of other web sites are enabled by this are quite famous okay so what else we have here in fact if you don't want to get a count on github if you still want to use it let's explore leaner so if you search for Linux because the Linux is open-source now and it is open so small I mean from the date is buried and the source code of Linux is available on the table now can you see that we have towels repository here so we have tour world who is the founder of Linux and you got a Linux core source for you can see can you see that we have all the newest little source code here right you can you can explore this once you get time and see the contributors so there are 18,000 people who have forked this position we'll talk about this working concept later and we have 6000 and almost always what is this count is eight point six point seven billion commits that's awesome number right okay so this is so this is your the options you have other options as well now let's create account on D table of course you need account there right so we click on sign up here and it will ask you for username so let's enter username I will say that is code training as my username and I will mention some username it's all they take again you see that I already have an account here so when you make an account make sure that you use a unique username unique email ID and unique password and that's it then we're going to click on create account you will get a get a github account even if they can't can give you some word options I will give you choose or choose your plan example if you want to go for a paid version or let's try this let's try this I will say that is core training 110 usko training one at the rate gmail.com and I will set any path so doesn't matter create an account because I will not be using this thing later okay what it says organization name what's wrong with this okay yeah password cannot be blanks let me set a password and if I create a if I click on create account it will ask you for the plan so we are going for a free plan because I don't want to pay for it now and of course if you are making a business project you can then you can go for the paid repositories click on continue and it will ask you for the experience so what who are you if you're new to programming so they want to know about know more about you then who are you a project manager or a developer or both what why you are doing code you're student you're a professional or you're hobbyist all those things and then click on submit you will be getting your github account now once you get your github account you can do lots of stuff again we'll talk about those things later so in this video we have talked about different web-based option you have in fact we are starting with the best option and later once we become comfortable with gate then we will see the command-line things how to use gate on one line now once you have logged in your github account this is what you will see not the exact stuff example and you can see we have two popular repositories now if your account is new you will not see this option now I'm using this account from from some time so I got this two depositories here which I created and if you can see there's a green symbol there that is my activeness on github how many how many contributions i have done and you can see some fancy stuff here let's not let's not go there now if you want to work with github you the first thing you need is a deposit free now of course you will not have any deposit please by default so you have to pay down your deposit rate if you can imagine a positive as a place where you can put your project so let's create a repository here and here you will say okay task now I will name my repository as task because I love this word dusk and okay you can add your optional description they're not required in this case now which option to choose public or private of course we will go for public because to go for private repositories you have to you have to go for the paid plan example if I click on private you can see it is asking for your credit card information I don't want to share that let's go for public and initialize the suppository betrayed me that means you will get a readme file here now in this will be file you can enter some data about your project about the commits which you are doing all those stuff and okay we'll talk about this later in some time so let's click on this create repository and you will get your repository called as dusk here I can see that we got you a repository task and we also have one one file here which is wait me dot MD now this is a special special extension which should get dot MD which which stands for mouth down we talked about markdown in one of the video so as you can see we have some awesome thing here now if you are new to github you will not I mean you will get confused with all this options trust me when I started working on github I got ways to get confused between these tabs so once you get some experience you will get to know what each term means okay so if you see we have a code tab here in which you it will show you your code the number of comments now what is this commit we have created that file remember readme file that is one commit we talked about that will talk about branch later we'll talk about contributors later what I want to do now is I want to create a new file now every time you change something on the repositories you are doing some commits let's create a new file so when you when you click on new file now question arise what new file I will create now of course we are programmers right so we will be creating a file depend upon which language you like example you can write a Java file you can write a cs5 which is a shop file you can write a PHP file you can create a C file doesn't matter gate supports all the files now kahshanna is which which language I will be using now I don't want to confuse you so if you do if you don't if you're not comfortable with Java I don't want to show your Java code as of now right we'll do that later time mean let's say if you are working with a normal file and normal father will create here is called as recipes dot txt now let's say P is why the zip is because we have one more channel which is the disco kitchen where we will where we normally create lots of recipes so this great arresting file here so here I will maintain all the recipes which we are which we have already done and we are going to do in future so I will say welcome to telesco kitchen let's zoom it so we got welcome to things for kitchen and let's go down and here will mention what we are doing so we are simply grating of five is three cities dot txt in which I have added a text again we can add some recipes here I will in turn my first recipe as okay what recipe I will create maybe okay so I will say this is key okay so this is key okay I will say next one is pasta so I got to I got this two recipes here and let's say what recipes file created so that's my first commit and you can see that we have one more option which is create a new branch we talked about that in some time let's click on commit new file I know I'm talking about lots of thing which we'll talk later trust me it will make more sense once we talk talk about those things later if I open the mind so we can use that we got our ACP s dot txt here if I open that file it will have something called as welcome to Teresa kitchen and Kieran pasta right you've got your file imagine you're working on a project and in your project this is your current state you are providing these services now maybe in future you want to update some data of course that's what we do right when you build a project you don't build an entire project in one day it takes time slow it take it takes time right so initially you will write something then after some days you will write something after some time you'll write something and after doing all those things you will get the entire big project now after every work what you will do is you will say commit write so that you're saving your data that's what we did here now if I open recipes once again this is my current file right now what if I change something so I will edit here and I would say okay I want to add some new dishes so I will say this is chicken fry so I will add a new T switches you can fly here and once you have added this again I will do the same thing I will say chicken add it and this I will commit on the same branch and done so I'm coming the changes here my job is done you can see we got three recipes here now the thing is what happens you know okay we just let me do one more thing because we forgot to do one thing at the end there should be a thank you right so I would say thank you okay and I will say regards comment now there should be a good message enough anyway you commit there should be a good message which may which should make sense right don't just say the way I am doing now so you can see we got this data here now after some time you felt you know this is these two things we don't need actually maybe our we was doing to don't like knowledge so maybe we can remove this part now how do i remit this remove this part so what we have to do is we have to again click on edit and then we have to remove remove thank you we have to remove this kitchen fry right we're not kitchen fry it you can fly right we have to remove that stuff or what we can't do is we can just go back to the initial state now what I'm saying is if you can't click on code you can save this option of permits it's not for comments and if you click here it will maintain all the versions now this was your first version when you can do this file it was having only read me and in that read me you had nothing right then out of some time you have committed one more one more thing which is okay let me just go to for comments and here we have you got recipes file created this is your comment if I click here you can see we have added this for these three things we have added welcome to the disco kitchen we have added this plus and then I mean this painter and then tear and pasta this plus means we have added those files right and you can see this green means they have added those files you can say six addition and zero deletion so six is I mean six addition this is what we have added in your file okay so we want this this state now now how do you go back to this particular state and you caught this state right so if you click on View this is your state so you can so when you are working on a project and after let's say you've got a project and after some time you have added some features and those features are giving some issues now you want to go back what you can do is you can just search for the version which you have done and you can go back there this is the awesomeness about any gate to gate management system you can use bitbucket everywhere you've got the same faceted because this is provided by gate it maintains all your versions right so this is our something so why so this is how you can use github so we have talked about very simple stuff we have cater to the file which is recipes dot txt we have added some content and we have we said we can go back to the previous commits and that's the thing you can do so we got this file here which is called as recipes dot txt if I open this file you can see we have this thing we have not removed chicken fry yet now what I'll do is I want to add some more details or some more recipes if I click on this let me just add some more recipes I will say beans and then I will I want to add some more stuff let's say oh yeah what else we can have we can have a pizza okay so let's say we have these two things but I'm not sure if we really have to add this feature let's say if you are working on a project and you have added some to two more or two of the features now if you say commit now those features will be added in here in your project maybe you don't want to do that in the current project you want to have that in the next major version because normally when you build a project you go for two different things we get - we go for - versions we can go for major versions maybe you want this thing in a major update so you have a choice of committing this in the same branch you can say I've added beans and okay water it beans and pizza so add it now here I need to spit two things now you can commit directly to the master branch because by default you will be having a master branch now it gives you one more advantage here which is called as one more option which is create a new branch for this commit now it is advantageous if you create a new branch let's say I will name this branch as could have this simply means that I can have these features I would say could have branch so this might could have branch and say a proposed file change now you can see okay so okay just saying up is added that's fine that's fine okay I don't want to do anything now so that's my thing so if I hope if I go back to code can you see that it gives you an option of branch here okay so that branch it says could have branch now this is the new plans which I've created if I see the recipes here it will have all the recipes the old one and the new one which you have created but what if I go back to my own branch which is master branch you see that if you expand this you have an option of master branch there if you go to master branch hey can you see that we don't have beets and pizza here because we have added those things a new branch that means this is a branch where you can actually work on on the current current version so imagine this is 4.7 version which you are working with on your software and for sure which features you want to add you can add those features here example let's say you want to have extra features okay what features I will have oh maybe I will say thank you and later I will say final copy I am added this text now there were meant to add this text and if you say recipes this will say done with current version okay I can't wasn't lying now if you commit this changes you can see we have two versions now in two different branch in your master branch you have this text which I cannot see now hold on is it refreshed Oh mind 10 okay okay so that we got final copy that's my master branch and if I go back to my I could have branch and this I don't have that final version done now what I wanna do is I want to reflect so we have two different branches right can we merge these two branches I want to combine these two files right because I felt you know this is perfect I want to have this Pizza and maintain the current version itself can we do that can we just merge these two files let's try what I'm going to do is I will click on this edit I will say done my changes imagine you're adding some comments so then my changes and I will say commit once again I will say done I also commit now what you can do is you can just merge this two files but how do I do that we have to search for the option to merge this files now where is the option I guess my entire is not working properly just give it is working very slow okay now we have to search for a place where you can very well get to you look at the option of merging these two projects or to this to these two branches what we can do is we can go to tusk and here you can see we have option of compare and pull request now if you click on this you have to send a pull request so you can see we have a base which is master branch and you are comparing this to could have because these are two different things and it's it gives you I so it says can't automatically merge normally it happens because what we have what we have is we have some conflict here the conflict is we have we have two different files okay let me get a pull request and let's see what happens so let me get a pull request and it will show you where the issue is and if I go okay so case that we get says this branch has conflicts that must be resolved now why this conflict because if I click on resolve conflict you can see there's a conflict because we have added this files in between you see that one file is saying done with changes and other file is saying final copy and this is done by could have and this is done by final copy so as a human you have to solve this issue now what you can do is you can remove this thing you can remove this space and you can remove this so this part came from could have and this this part came from a master and now you can merge remember this one is this one is also coming from could have and once you have done with the changes you can say mark I dissolve this is how you can combine two files but git is smart enough to combine this two the problem is I have there was a problem with the spacing of the sentence that's why it was not able to do that but normally it does okay so it says conflict removed and now click on merge I mean commit much so these two branches are getting merged now so your could have features are going to the master branch and let's hope it is done you can see it is done I want to merge three commits ok now finally you have to say this it can say that it says no branch this branch has no conflicts once you have solved your issues you can click on merge pull request confirm much it's going on is going on and it is confirmed okay so can you say the magic is done but how do we verify go back to code go back to master and you can see much master into could have so does done go to recipes okay now you got beans and pizza you got done my changes and you got a final copy awesome right so this is how you can create a branch so if you are working on a project you can create a separate branch and you can work on that project or that branch and later you can merge okay but then let's say if you have multiple people working on this should we create multiple branches that makes sense we can have much about the answers there but just because get I mean Geetha provides you more branch that doesn't mean she should create keep creating branches right your branches should make sense next what if you have someone who want to contribute to your project now we will see that one so in the next video we'll talk about this forking and we'll see how someone else can contribute in your project so in the last video we have seen how can you work with two different branches right so if you remember in a we had two branches one is master and we had good half now we can have some more branches if you if you think that you have multiple developers and they want to work on separate branch you can do that but what if you have someone who is not in your team but he want to contribute normally what happens is when you work on open source project there are people who want to contribute in your project now in this what we will do is if I go back to code and you can see we have two files right in a master branch we have read me file and we have recipes now let me create one more file here but then I don't know how to do that stuff and we have someone in the open-source community who want to contribute so let's say that person is me so I will open my repository here so this is my personal repository and I've been ready to 0 and if I want to contribute how would I do that so what I want to do is I in this project and there's in this repository I want to create another file called as Pisa dot txt so I want to define how to make Pisa our how I want to get is recipe for Pisa I love Pisa by the way ok so how do I contribute so what I will do is I will go that is called training in fact there are two ways one you can search for that you can search for the disk or training slash the project name which is in this case let me just search check the project name it is task so that is core training slash toss this is one way or you can get the link from the from the Creator so once you get this link this is the project I want to contribute here so what I will do is if I want to contribute I cannot change this file right I cannot create a new file here we do have a choice can you see that so if you click on this create new file let's see what happens so if I click on this great new file you can see just giving you the option but see the message here it says you are creating a new great you are creating a file in a project you don't have a right access to it unfortunately or that that's not here but then can you say that we have created a fork of this project so normally what happens is whenever you try to edit the file it will fork a project in your repository so this is how you can do it the another way is going to click on this fork and it will give you the project I will go back here and I will enter the file name I will say the file name is pizza dot txt now I will write the recipes so I will say recipe created by recipe from Naveen ready and I'm a very good cook so what I do if I want to make a pizza I will say there are some steps to do it first a step one go to Domino's calm and step two select the pizza and order that's it so this is how I make pizza ok so I don't make this I hide from some some pizza parlor ok so once I've done with this I will say created pizza dot txt that's my message I will say propose this file or put up the proposed new file now this is the file which I have created right so I will click on this proposed new file and it should create a file but then question arise where it will create a file as you can see if I go to my branch I will see that file there but where the file is created and the file name is Pisa or txt you have added this number of lines and I will say create a pull request so once you click on this create pull request it says ok what is the message you want to say and you can see it says able to merge the branches can be automatically merged that's awesome you know and I will say create pull request now the request is sent to who it has sent to telesco training or that's great the request is sent automatically we are not doing anything and the branch is patch one is at the branch maybe so if I go down it says there's no conflict and you can click on comment ok anything left here everything seems good you have added nine lines but those there's no deletion of the line if I go to code and if I see Oh is it my project let me just go to my deposit please okay this is my if I click on repositories' now this is the depository which I have created called a task one if I click on that there should be a file called as pizza or not here this is my master blanch it is there in patch one okay can you say that it is we have pizza dot one so this patch one is my the positive name this this is my branch name we have missed this step somewhere in between so you can see we got pizza dot txt and we got a piece of SCP here so it is there with me right it is there in my repository what about the risk or training which is the original depository if i refresh of course it is not there in the mass talk instead it is not there and we don't even have patch one here because patch one is only for now in at the account how would I get those changes here it's very easy actually you can simply click on this pull request can say that from there from my account throw my personal account I'm sending a pull request to this particular account and it says credit Pizza txt now as a tennis court rate or tennis court training owner I will check okay so this guy call this moment ready has sent a new request and in that request let me just check what are things we have it says credit Pizza but I want to verify what is that so if I open that it says the recipe is from Naveen ready and this is recipe that sounds good again this actually doesn't sounds good because and not get making a pizza here I'm ordering pizza but for this thing it's okay you know so I will see the recipe and everything seems good I will click on merge pull request if everything goes good then only I will say much pull request if I think you know that the code which is sent from there from the person or the contributor is not suitable for this project I will send him some feedback I will say okay we are the work which you have done is awesome but then if you can change method number you if you can change two methods there it will be good so that's how you can send back your response otherwise everything is good you can say confirm much it should happen and nothing ok it is done I guess it just done go back code and can you see that we got pizza dot txt now this visit or txt is not gated by you it is created by one of the contribute to write and you can see that the contributor is never going to do 0 that's great and you got your of you got your peas are there so this is how someone else can contribute in your project and you can see we go also got our notification here so for one that means one of the contributor has walked your project now what you can do is you can have your own github account search for that is quite tusk I mean super training tasks this one you will find this link in description area which I will make sure that you have that link create a for create a request create new files and send a pull request to me so if I think your recipe is good I will accept the request otherwise I will I will reject your pull request so let's see how many things how many requests I get in in next two days so that's it that's how you anyone else can contribute in your project that's how we can use fork and in this video we'll talk about how can we upload a project from Eclipse to github now of course when you have an eclipse project there are two ways of uploading it one is the standard way using command line so if you use terminal or command line what you can do is you can write some commands and you can push this project on ticket absorber no matter you have a repository there otherwise we can use eclipse now if which is an easy way you can use in Eclipse to push your project directory to get up now of course to understand this video you need to have some basics of gate what it worries I click it is and what is github but if you know it you can go with the video otherwise you have to watch my previous videos on github now what we will do is we will try to push this project we have a project called as my code in which I have two files one is alien and calculator doesn't matter how much code you have I also have a text file just to show you we can also upload a text file I want to upload this project on github step one would be of course you need to have a github account and I do have a github account so it's a free account or the only thing is if you want a github account which is public it's free but if you want a private repository then you have to pay for it then public is fine for us now if you can see I have a github github deposit I get github account and github you create different repositories for different things example I do have some dummy repositories here I have some like I was doing some project there so I have my own repositories here now this step would be of course you need to have a repository your own repository and the way you can do that is by clicking on this new button when you click on new I will upload this project on a depository which is called as flash now flash is basically my batch name so I'm taking online courses where you have a batch one is flash so I'm doing it for them so we have a flash as a badge as a batch as a depository name you can have any deposit and doesn't matter you can use flash you can see ABC you can say P Q P Q it doesn't matter and you have to same sonic public of course and then why public is because it's free otherwise when you click on try what you have to pay for it and then I will click on create a positive and you got your repository here now in suppository again you can follow the instruction if you want to do it in command-line otherwise you just try to remember this this link you can fact you can copy this link and you can have with you so copy this link we will use this link in the Indians step now once you've got this Lake link with you this is the main repository link you have you can see we have got flash dot gate now once you have this link with you let's go back to eclipse now in our Eclipse or before that I just want to verify one more thing if I click on this flash now you can see this repository is empty you don't have any repositories here also the the projects here now what I'm going to do is and I'm in my Eclipse I will try to push this project now this step would be right click on the project first and there's the option of team now in this team you have to first of all share this project so of course you need to share this project in order to upload github now when you share you have to first push this project on your local git repository and if you have installed gate that's great otherwise you have to follow the steps luckily if you are using Mac we by default our get installed if you are using Windows then of course you have to install gate so there's a different procedure to answer how to install gate ok now once you have here once you come here when you say create repository this is a fault this is for local one and I can select my own repositories here or we can create a repository I can say this is for so this so it will so this will create a local repository for me I will say my repository name is flash again it's not compulsory to have that name but then that's fine it you can have the same name on the local and the server you can have a different name doesn't matter click on finish and we got a local repository this is a local repository for me and nothing to mention here click on finish now we got our deposit free now but this will be a local repository ok now how do we know that's a local deposit how do we know that it is shared you can see we got this no head thing and you can see this question mark that means yeah your code is not committed yet so first you have to commit your project in the local one and the way you can do that is by saying team this option of commit and you have to select all the files which you want to commit again or normally we don't push all the files but then that's fine for the example we can that I can say first coverage uploading all the files all files now you might be thinking by doing this will it be uploaded on server of course not so if I click on commit and push ok now it is asking you for the remote one as it remote one year so when you click on push it will ask you for the remote one okay now we have a remote repository and then we can see we got remote repository here we are getting a name of the URL and then I already have a github account here which is Navin ready and I have set up my password also you might not get this step again if you have not got this window don't worry I will show you the other way around if you are not getting this way and if you if you got this window great you can simply click on next and you have to selective master branch if it is already there and click on next and it should push otherwise we'll do another step if I click on finish it is pushing now just pushing all the files and yes you can see that it is pushing on your repository and click on OK I guess we pushed let's verify let's refresh this thing I can see that we got all our files here you got your my code as the folder and you can see we got all our files here now in case if you have not got that window or finally if we can have a round of applause that we have completed the first first commit now but not if you have not got the got the option what you can do is you can push on the local repository you might not have connected your local repository with this server in that case what you do is you right click here and you have to say team and this option off show in repository view in case it is not working for you ok otherwise it is good to go in this you have to create a remote one luckily I have my machine was connected before with the server in this case you have to click on remote you have to click on clear to impossible you create remote because you are not connected yet in which you can mention the name of the repository as flash or anything you can say remote flash you can click on ok and here you have to click on change where you will mention your so your repository length remember that link we have worked with you have to paste it here with the username and password of course and then click on finish and we are good to go save and push it will work for you right the same thing so this the second step you have to do in case they Eve the first the first step doesn't work so that's how you upload a project from a local repository to this remote repository now we can have one more project here we can create dummy project here we can say maybe any project maybe a web project we also do we'll say this is a AAA and click on finish and if I want to push this one of course this is empty now but we can create files and we can put you files there if I want to push this project it's very easy now just say write like team share project just to recap these steps again I can use the same local repository if you have and then click on finish now this is done in the local one if you want to push it on server will say team commit will say it all the files you can have any comment you can't push comment and it should be done so it can upload multiple because it is not that you have to create you have to push on the one project you can have multiple project and you're depository and you can see if I go to flash we got two for two projects here you can make your changes and you can push here and that's how you upload other on github it's that easy right so that's it from this video I hope you enjoyed this video for more videos do subscribe my channel thanks for watching
Info
Channel: Telusko
Views: 695,338
Rating: undefined out of 5
Keywords: telusko, navin, reddy, tutorial, java, python
Id: WbwIoQYP6no
Channel Id: undefined
Length: 51min 53sec (3113 seconds)
Published: Sat Jun 15 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.