 Welcome everybody, my name is Roddy and you are watching my channel Roddy the Brand. Today I have a very quick video for you, today we are going to have a look at how you can install Git and how we can use Git to publish our first repository on GitHub. So let's not waste any time and get started. So the first thing that we need to do is install Git and to do this you have to go to HTTPS column slash slash git dash scm dot com slash download and I will post this link in the description below so you don't have to type it and obviously make sure you download the one for your operating system so if you're Mac use the Mac version, if you're Windows version and if you're Linux Unix use the Linux version. So I'm going to download the Windows version because I'm using Windows at the moment so let's click download and I'm going to download the 64 bit just because my PC is 64 bit. Now I've already downloaded the file so I'm just gonna go ahead and start the installation and the installation process is actually fairly simple and I'm pretty sure that it will be very similar on Windows, Mac and Linux. So on Windows is pretty much you just have to press next a couple of times so let's get started and I will show you my settings if you want to copy them. So I'm gonna click next the first one is where to install the files and I'm just gonna continue with Git and this is just saying that the Git folder already exists and this is because I had to uninstall it to show you how to install it so let's click yes. I'm going to use the default settings for this let's click yes the default settings for this one as well and for the editor I'm just going to choose the visual study code just because that's the editor I usually use and let's click next as well then I'm going to leave this one on recommended which is the default setting then we have the default settings for OpenSSL let's do that I'm going to leave this option here for the first one for this one use mean tty I'm going to leave the default one for this as well the default again here and git credential manager is what I'm going to use here enable file system caching yeah and that's pretty much it so let's click install and give it a second for this to install and then we can get started okay now that we have this installed let's untick this and just press next and that's it the setup is already in now to check what a git is installed on our system and it's working the easiest way to do is to open the terminal with your Mac or open the PowerShell if you're Windows and I've made the letters a lot bigger than they used to be just so you can see a little bit but the commands will work the same on Windows PowerShell and Mac on on terminal using that so what you have to do is do git dash dash version and this should show you this git version 2.28.0.1 and obviously the version could be slightly different for you if you install in a newer one but this is the latest version that we have today and that's absolutely fine okay now that we can see what version we have installed we can actually start using it so let's close so let's minimize PowerShell from now now let's go to github.com and this is and I will link this in the description as well and if you have a look at the pricing super quickly and you will see that we have this free tier which is really good it's unlimited public private repositories which is amazing unlimited collaborators and so on and this is absolutely perfect if you're working on your own or like in a small team I think this would be absolutely fine and so yeah go ahead and register your free account from github.com and once you're done just log in so I've already got my account so I'm just going to sign in quickly and now that I'm signed in I've actually went to my profile here just click profile and in here you should see an overview of your profile and also repositories now if we click on repositories inside here is obviously where all your repositories will be listed and let's get started by creating a new one so I will show you the easiest way to get started with this and this is by clicking this new button here let's click it and let's create a new repository I'm going to call my test you can add a description as well and you can decide whether this should be a public repository so everybody sees it people can download it and use it or you want to have it as private so you can only see it or maybe your team so I'm going to go for a private one here and I'm going to initialize this repository with a readme file so let's click that and create the repository this should take a second and now we have our first repository okay the easiest way to start using this project is to actually clone it so if you go here to code click on this drop down and this should give you the clone with HTTPS option now what you have to do is click on the copy button here and this is basically going to allow us to quickly clone the project somewhere on our computer now I'm just going to use my desktop for this and in Windows you can actually do your left shift right click and open PowerShell Windows here which will basically open the path to desktop but if you're using Linux or if you're using Mac you're just going to have to CD to that folder and then clone the project there so to clone the project what you have to do is get clone and then paste the URL now this will actually ask you for your username because it's a private repository so you need to be logged in to be able to download it but if but if it was a public repository you it would probably ask you to log in a little bit later in the process maybe when you're trying to add files to the project and the process will be absolutely the same so on Windows you actually get this really nice prompt which you can enter username and password or if you exit this this will actually do it through the command line it will just ask you please enter username and password so let me enter my username and password and we will continue okay now that I've entered my username and password I'm going to click login and hopefully this should continue cloning my project and indeed now that I have logged in and downloaded my files the login prompt will not appear anymore I've actually never seen the login prompt ever since I've logged in the first time on this pc so I assume that once you log in it's gonna be there for a while which is great so you can just start using it without being stopped to log in and all that kind of stuff anyways now that we have the project here obviously if you're on mac you're gonna have to cd on into the folder I'm already on desktop here and I can just cd to the test folder so cd test and we are now inside the test folder so I could do ls and this will list all the files inside and of course at the moment I've only got the readme file so let's open this in any code editor so I'm just going to open visual studio code super quickly and let's add something so let's say we want to start a new html project I'm going to click a new file index.html and let's just create a standard html five page just like this so let's say we've created this project we're happy with the current changes and we want to commit them so to do this let's go back to the power show and obviously make sure that you are inside the off-close data so let me actually do this super quickly fonts 20 okay I think this would be slightly better properties font 20 okay okay this is a little bit better to read now and the first thing that we can do is check the status of our project to do this we can do git status and this will basically list all the new files or all the changes that you've made and at the moment as you can see I've got a new file in here called index.html and we can commit this to a project so to do this we can do git add which git add with dot which will add all the files that we have obviously the moment we only have one and committing the changes will basically make copies of that file every time you commit to your project so let's say I've made some changes on the index.html today I commit the changes I make some more changes or my teammate make some changes and they commit them there will be a backup of the index.html that you can have a look at and see whether and see the changes so maybe if you make an error you can always go back and so on so anyways let's commit this file and to do this you can do git commit and we can do dash m and then just give it some sort of description so let's say first file let's close this and press enter now that the changes are committed that doesn't mean that the files actually uploaded on our repository to do this we need to push the files so we can do git push and give it a second and this should upload the files now that the files are uploaded we can go to the repository here on github and refresh as you can see you can see the index.html here being added 27 minutes ago and the readme file has been added seven minutes ago which means that I've probably took for far too long anyways now I can make more changes I can commit the changes push them and so on and this is pretty much the basic usage of github now we could also talk about git branch git merge and git checkout but I want to keep this super simple so you can get started and you can check the the ones that I just listed on your own it's fairly simple to do but another thing that I wanted to cover before we wrap up with this video is imagine that you have your desktop here just like I do but you also have a laptop or you're working with a teammate now you might be wondering what if your teammate made some changes how would you get those changes on your computer or what if you were working on your laptop from time to time and then you want to make some changes on your laptop push them to github and then get the new changes on your pc and so on you get the point so let's say our teammate made some changes maybe we can edit the readme file in here actually and let's just put test one two three and save this so we've committed those changes they are on our project we can click here and as you can see changes were committed just now but we don't actually have those changes on this pc yet and to get the changes it's actually fairly simple you just go back to your terminal power shell whatever you're using and all you have to do is do git pull now this is going to go to github and pull all the new data and as you can see here a list all the data that's pulled and usually a list like files removed files added and so on and if I go to vgstd code which is where I've opened the project and click readme zoom in a little bit you will see that we got test one two three here which means that we have the latest version of our project that is sitting on github and for the last time let me just create something super quickly hello let's save this let's go back to the power shell let's clear this and let's do git status we have the index dot html being modified we can do git add everything and then we can do git commit minus m and then we can do second changes like this and git push this will push the new files to github then if you go back refresh you will see that the new files were just added now 10 seconds ago and if I respect the index dot html you will see that we get h1 hello h1 and this is pretty much all you need to know to get started and as I said make sure you explore the branch merge and checkout by yourself but that's pretty much all you need to know to get started and especially if you're working on your own you can just keep different versions of your files which is pretty cool like you can see the history here it's fairly useful to have I fully recommend you using github if you enjoyed this video tutorial and you'd like to support my channel make sure you subscribe by hitting the red button below smash the like button and feel free to say hello in the comments below I answer every single question and I always say hello back so that's pretty much it I will see you in the next video thank you very much for watching