Git & GitHub Crash Course For Beginners #3 - Remote Repository

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
code afric unlock the future all right welcome back um we are still ongoing with our get practice and today we'll be looking at how to create a remote repository all right so um in our previous lessons we looked at how to install gates and we also look at the introduction to get and we also run some get commands okay so we run the gate in it to to initialize our local get repository and also we did get app to add our files to the index and we also run a command gate status to check the status of our working tree and we also did what get commits to commit changes in the index all right and i did mention that the remaining command here we'll be using them with our remote repository okay and that is what we are going to do now all right so this is the remote repository and the local repository like the google drive scenario that i gave you all right so consider this one to be your device okay your laptop or your computer here that is your local repository and this one it is where you are going to use a github or a kit bucket um to push the file that you are having here into this google drive okay all right just like that anyway so now let's get started okay this is our sublime test and this is our terminal window all right so now let's check the status of our current project okay so let's do the status and we can see that our working tree is what clean all right now let's say we have committed all our files successfully at our as our working three screen what if we want to remove a file maybe we don't want to add that format we want to remove it we have already committed it we already added it but how do we remove it let me show you this command before you move on so we can do get rm dash dash catch then you mention the name of the file so in this case let's say index.html then hit enter you can see rm index.html which means index.html has been removed the rrm stands for remove okay so for you to get the proof let's do guest status and check you can see that the index.html here it is still red okay which means it has not been added all right so um let's do the same command get rm and we catch our starship.css enter the same thing here remove starship.css all right so let's check it so we do status and you can see that starsheet also has been removed all right let's go ahead and add them again get add all all right then let's commit minus m then our message okay so second initial commit all right oh anything goes alright so now let's do git status uncheck all right so our working three is clean all right now um before we move on to our remote repository now if this is your first time of using git on your machine you have to do a configuration okay you have to work on your configuration okay so the configuration goes with your name your username and your email okay you do it right here so let me give you an example so the command for the configuration is git get config dash dash grouper then you do username dot user.name then in a string or in a quotation you type your username all right so something like this all right so do something like this then you hit enter then after you work with your username you have to also do the same for your email so get config global dash dash user dots email okay now your email address enter all right now we are on points all right now let us run another command to check something so we do get config dash dash list okay so it is giving out the list here don't bother about the rest just look at this one okay our username is here and our email that we set is here all right so make sure you get it right okay all right so now let's go ahead and create our remote repository which is the github okay so you type um github okay just type github select the first one all right now um you can sign up okay if you don't have an account you have to sign up from here so you just have to enter your email address just like that um enter your email address you continue it will request for your password your and call and you are good to go i already have an account so i'm going to sign in so please do sign up if it's the first time sign up okay so this is my get account let me log in okay and all what i have to do is to create a new repository okay these are my existing project that i have worked on they are all here if you go to more okay so they are all here i work on a lot of projects here all right so now i'll just click the you come to new then you have to you have to give your repository a name okay so let me call it my practice you can leave space but you can use and karmic is in or you can use a dash or an underscore but you can use spacing okay it is not good to do that all right so now here is okay but um the description how do we call it so i say get practice tutorial all right all right so from here what you can do here is that you can create your repository as a private or as public okay so what it's trying to mean is that in public everyone can see your work okay everyone that that will have access to your um your address can go and check out your work and also in private that one you have to specify the people that can have access to your projects so at first private um used to cost some money but i i learned this free now okay but myself i have not tried private before i always go for the public so you can just go ahead and go for the public and let's continue so now we have a few things here that gets in yo they get in your means that they are something that you you want to ignore you can configure that one so that you remove those things from and we have two slices forget about everything here okay let's leave it as you are seeing it then let's create our repository the readme file also let's forget to you let's create the readme um if you're if you're creating a real a real-life project maybe you might use the readme file to let people to know more identify your projects okay now let's go ahead and create a repository click on it all right so what we can do from here is that you can see that that gets a net we have already initialized our project so we don't need this one and if you want to add a readme you can go ahead and do that but for now for people of this tutorial just a practical we don't need it okay the readme as i said before it can you can add more descriptions to your app so that people will know exactly what it means okay and we have um the gates commits we have already committed um we don't need all this what we need is the last two okay this one the remote add origin and this one origin push okay so there are many things involved you can copy it or you can type them by yourself but i think if you copy it is good all right but before we paste this let's check something let's do this command let's do git remote now let's paste in the command i've copied already so let's paste it now i'll paste hit enter all right now you come and copy this one too all right if you love typing you can type them you store energy and get push minus you origin main okay so most often it was sometimes you find it as an origin master okay all right you're having some issues here okay understand the arrow let me let's fix this okay let me use um get push let me type them all right all right now our project has been pushed okay so you can see what we have here [Music] go to repository master from origin all right like i said before here they give us what and main but i have to rather use master in a case if main were for you fine but if it doesn't work just do get push origin master just change this main to master and you are good to go all right so another thing is that um in your case in case you did not fill in with the configuration with your email and your password it might ask you your email your password so if it happened like that it with a graphical interface just put in your email your password and you're able to go if you encounter such an issue just do it as i'm saying input in your email and password you're able to go all right so now let's let's let's come back and refresh okay you can see our project is here and all our files is here you know we have only two files in our project that is the index.html starship.css all right so you can see if i click on the idea.html you can see what we are having here in our subline test here it is exactly what we are having here okay so the project has been pushed into our robot repository all right so uh let's refresh again let's go back okay now let's come back to our sublime test um we're almost done let me show you something again let's save this one let's save this one as script dot js okay so now we have js which is javascript then let's do console.log hello world okay so now let's come to get status we can see um javascript has not been um added okay so let's add it okay so get add let's do all then let's do get let's commit um guess okay so let's commit then we said what our scripts added successfully all right now okay let's do status and see now okay we can see that our working three is clean which means javascript has been added okay we've committed it but if you come here and refresh you'll not see it here okay we don't see it here we don't see javascript here djs because what we've not pushed so that is our next command to push you do what gets push okay that is all enter sorry um you made a mistake okay so get push okay now it has been pushed so let's come to our our repository and refresh we can see that we have our javascript here so that is how it works um you can work on a project here then you push it there you can work on a project here and you push it there okay so you can see that when you push it we have our js here and when we open we have our console.log here all right so that is that okay so now um the last thing that we have to do is how to clone our project or how to download our project okay so like i was saying um yeah in a case you are you are not with your machine you are not with a pc but you have your email and your path um and your password right um maybe you are on a different you know different machine how do you prune your projects and continue working on that project all right it is very simple okay so you can see from here okay so you can see from here you can see clone here so if you click on it like this you can you have two options you can download so file and you can use it you get the folder just like that and use it we will come back to that one but let's see how we clone it later we'll download the file and i'll show you that one too so just copy the url here just copy it so i've copied now let me come back and to my desktop and create another folder so let me call this one um okay let me call this one get practice okay so get practice let me get another terminal okay then let me cd okay let me seed into the project uh let's go by the traditional way okay drag and drop cd okay so from here i just have to type in this command get chrome okay get chrome that is all then i paste in what i copied enter okay so let's check our folder you can see the folder that we created was empty now look inside the folder you know you can see it has created another folder here that is um the name that we need to save our repository might get practice okay when you open it you can see or the project is here so you can you can just go ahead and continue working on it just like that okay that is the project that we are having here if you open it let's open it in a sublime test you can see that is the same project the same project you can see index.html the same thing all right and that is the awesomeness of git all right now let me show you also how you can download it so to download that one is very simple you just have to click on the download click on it and you can see it is downloading here so after it is done you find it in your downloads it's here mind get practice master blanche when you open it the folders are here all right so you can choose either to clone it or you can choose to download it and use it all right so now looking at this from here you can see that we've covered all the gate commands here with exception of the pool okay covered in its add status comment commit push and clone so now let's look at how the pool also work okay so with the pool we can see let's come back to our original project so here let's say it's a team work we're working with different developers and they have committed exchanges and whatsoever on the on the project you can just pull them and just have the project up to date on your on your site on your local repository okay so um you just have to do get pull that is all then hit enter all right you can see here all right you can see here that's already up to date so in a case that they also added some files and add and and also push it you can you have all those files that are added here right here um in your projects in your terminal all right so that is that uh so before we end before i leave you i would like to talk about the pro gates okay it's a free book that you can download from the original website of kids okay it is free if you go to the gate official website you can download it for free and i recommend that you download it and go through okay there are so many things that you can learn from here if you want to move from a beginner to an advanced level okay all stuff that you covered here is a beginner styles okay so if you want to take your get practice into the advanced level you can equally do that but on a more serious note the most important command that you need to know is what we have practiced so far so congratulations let me show you where we can get the book so just come to the gates official website so we said get okay so here the book is here this is the book you can download for free okay if you truly need it you can download it okay all right so thank you so much for your time and i will urge you to keep on practicing until you get to profession
Info
Channel: Code Afric
Views: 78
Rating: 5 out of 5
Keywords:
Id: V5Yk8N0cOnM
Channel Id: undefined
Length: 17min 42sec (1062 seconds)
Published: Fri Jul 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.