How to Install Git on Your System
In this lesson, we're going to walk through how to install git on your local system. I'm going to include this link with the set of instructions in the show notes and we're simply going to walk through these in order to get git up and running so you can start making comments, Implementing versions, and performing each one of the other tasks that we're going to go through in this course.
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
Video locked
This video is viewable to users with a Bottega Bootcamp license

So the very first thing that you want to do is to come down to where it says setting up git.

large

And you need to install it on your system so click on this link. And this is going to take you to the download page.

large

Now depending on your operating system click on one of these buttons. Now it should pick up the exact operating system that you're on right here on the right hand side. So it picked up that I am on a Mac and so it's recommending that I download 2.16.2 and if I click this it will start installing on my system. If you are on a Windows machine or a Linux Unix System click on those links and then it will download and then you can get everything up and running.

So that's the very first step is to do that. I already have Git installed on my system so I don't have to click it but if I was needing it I would just click on that button or if I was on one of the other operating systems I'd click on those.

Now another note here is there is what is called a gooey client. So if you're not a fan of working with the terminal and the command line then the gooey client allows you to perform all of the same tasks that were going to perform in this course except it allows you to do it in a visual manner. And so the closest analogy to this would be it's almost kind of like having GitHub or a tool like that on your local machine.

And so if you click on this link it'll take you to some of the more popular gooey clients.

large

Now I'm not going to be using any of those in this course. However, there are some here that are very popular, they have them separated by operating system and they even have mobile versions. So if you do not like having to manually type in all of the commands then this might be something that you'll be interested in using.

After you have installed this on your system and also just know you may have to restart your computer so make sure you go download this and then you can come back to this part of the video. After you've done that now it's time to set up your credentials. And so the next step is right here where it says setting up git set your username and git.

large

so if you click on that what you can do is you can choose to set your git username and you can have it for the entire system or you can do it on a per-project basis.

large

Imagine a scenario where you are having to have one git account on your local machine and it needs to be different for one specific project. I have never really run into that scenario, I have mine set globally and I'm assuming that's what you're going to want to do as well.

So in order to do that you would open up the terminal and you just copy this link not the plus sign and then open up the terminal paste it in and then just type in your username. So mine's already on my system but when I did this before I typed it in exactly like this where it's git config --global user.name "jordanhudgens".

large

Now, jordanhudgens is my actual account, not the sample one that I set up this DevCamp GitHub. That is one I set up that I'm not going to use on my local machine that was just to show you an example of it so that jordanhudgens is my full username. And then if you come down here after you have done git config global username then what you need to do is to confirm it. So you copy this code right here and then you can just paste that. And here you do not have to type anything else and that is simply to confirm that the username that you provided is what you want to use.

large

So now let's go back. We've finished 2 out of the 3 steps so let's go and set up the last item and this is going to commit our email address and so we have a username in git and in GitHub but now we have to set an email address so we're going to follow the same exact pattern.

So I'm going to copy all of this code right here and then paste in whatever email address is what I use for my get hub account. So this is going to be your email address whatever it is.

git config --global user.email "email@example.com"

And then paste that and like we did with the username just copy this and paste in user.email you don't have to change it. This is just to confirm it, just like we did with the username.

git config --global user.email

Now that you've done that, those are the three steps that you need to do in order to setup git and configure it to work on your system. Now moving down we have a few other authentication items that need to occur so that first part was just configuring your system to work with git we installed it and we set the username and the email address but we also need to have secure connections and notice here that we have two different types of connections we have connecting over HTTPS which they recommend and then connecting over SSH and there are two different ways of setting that up so if you decide to like it says to clone with HTTPS this is going to walk you through what that looks like.

And then if you need to connect via SSH then you can click on Clone SSH and it's going to show you how to do that. We're going to do that in one of the next guides. But for right now I just want to show you those two options.

Now if you do not know the difference between those two just know that HTTPS gives you access to communicate with the HTTPS encrypted protocol and so that is 1 protocol type SSH is a different type of protocol it stands for secure shell and so there is nothing really that makes one better than the other one.

I will tell you that there are fewer steps in order to get the HTTPS one working than there are for SSH and so if you're very familiar with working with SSH then feel free to do that but GitHub even recommends that you use HTTPS and so that is what we're going to be using through this course. So if you went through that entire setup you should now have git and have a connection to GitHub installed on your system.

The last thing we're gonna do is just to verify it and the way you can do that is if you switch to the terminal and if you're on Windows you can switch to power shell and type

git --version

and type return and if that works and it gives you a version like it did for me right there

large

then that means that you have git on your system and you're ready to get started.

Resources