How to Install Git on MacOS 2024

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] what's up guys welcome back to code Wizard and in today's video we're going to talk about how to install git onto Mac OS so git is a free open-source version control system that allows you to keep track of changes and work on a code base with other developers and it's widely uh used in web development so we're going to install git onto Mac OS so there are a couple ways to install git um but one of the easiest ways is to use a package management tool called Homebrew um now Homebrew is can be used to install git but it can also be used to install many other different packages and it's also widely used in web development so after you use Homebrew to install git in the future you can continue to use Homebrew to easily install other tools so to install install home brew we're going to go to a website called brew. sh okay so this is the home brew website and to install Homebrew it's very simple there's this one single command here that we're simply going to copy into the terminal so to copy this command just go ahead and press the this little clipboard icon here and that will copy the command to your clipboard and then open your terminal and to do that you can just uh type in command space and then that'll open spot light search and then you can search for terminal press enter and then your terminal will open up so in the terminal we're going to paste that command and then press enter and it usually will prompt you for the password for your system now I already have uh Homebrew installed onto my machine so um it won't actually show you the installation process here but all all you have to do is type in your password and then press enter and then it will will go through the install process and it usually only takes a couple minutes so once home breu in is installed you want to make sure that it actually is installed successfully and you can use it so you're going to want to type in Brew D- version and this is going to indicate the version of Homebrew that you have now if you type in this command and there's an error or it says the Brew command is not recognized um what that means is you have home brew probably installed however it's not added to your path so when you add a command to your path that means you can access it basically anywhere um any directory on your machine so all you have to do is simply add the Brew command to your path and to do that there's just a simple command that you have to paste also into the terminal here and I put that command in the description below but again you only need that if it doesn't recognize the Brew command so you can see I have home brew 4.2.2 installed so now we have home brew installed and we can install git so to install git the command is Brew install git and that's it so we go ahead press enter and then it'll go through the installation P process for git and that's it so to make sure that we have git installed we can just type in g-- version and you can see get version 2. 39.3 is installed successfully so now you're able to use git on your machine the last thing I want to mention is the differences between git and GitHub uh if you're new to web development or software engineering um you may have heard about git you may have heard about GitHub so I just want to be clear that git and GitHub are completely separate even though the name sounds similar git is a version control system helps you keep track of changes like you do in Google Docs and Google Sheets um however GitHub is simply a website where you can host your repositories and when I say repositories I'm specifically talking about your project so source code right so if you want to push changes to GitHub as in let's say you're developing some code locally uh on your machine and you want to have those changes show up in GitHub then you would use a version control system like git to push those changes so git allows you to interact with GitHub but keep in mind that they are indeed separate so the last thing I want to show you real quick is I want to show you how you can set up your name and email on git so when you push changes to GitHub if you want to um it will actually display your name and email for the particular commit that you made um again for those of you who are new a commit is simply some type of code change that you did and we call that a commit so to set this up properly what you want to type in is git config d-g Global user.name and then I'm going to put in code wizard for my name and I'm going to press enter and then for the email we're going to do get config Global user. email and then you're going to do I'm going to do my email and then press enter and then to verify that this is working you can just type in get config d-g get user.name and you can see the name is code wizard so that's the name that you know when I make a commit it's going to show up as code wizard if I do get config dget and then we can do user. email you can see codewizard gmail.com so you can see that you know the git config is set up properly so that's it that's how you install git with Homebrew if you have any um questions about the commands I'm going to list all these commands in the description of the video uh like the video thanks for watching subscribe and we'll see you on the next one [Music] d
Info
Channel: Code Wizard
Views: 21,905
Rating: undefined out of 5
Keywords: how to install github on macos, install git on mac, install git on mac os, git installation on mac, installation of git on mac os
Id: B4qsvQ5IqWk
Channel Id: undefined
Length: 6min 41sec (401 seconds)
Published: Thu Jan 04 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.