How to Install Git on MacOS 2024
Вставка
- Опубліковано 3 січ 2024
- In this video, you will learn how to install Git on Mac OS using Homebrew.
Installation Steps:
Install Homebrew: copy the install command from brew.sh
NOTE: if you need to add Homebrew to your PATH, use the command found here under "Setting up your path": sourabhbajaj.com/mac-setup/Ho...
Install Git: brew install git
Commands to setup name and email in Git config:
git config --global user.name "Your Name"
git config --global user.email "yourname@example.com"
Commands to get name and email in Git config:
git config --get user.name
git config --get user.email
If you have any questions, let me know in the comments.
Excellent - thanks for the clear explanation
Excellent video. Thank you.
bro thank you so much it was an easy to follow tutorial
Thx for excellent explanation.
nice video, thanks from Brazil
Thanks a lot for your video, im from Mexico and any video in Spanish is good like this one that you made
Very good video and the explanation is very clear. Thank you.
Thanks for the video on MAC.
loved the video
hi, the git version on the terminal output is that of Xcode installation - not that of Homebrew installation. You may check this with: "which git" or "where git" on Terminal. OR simply look up the Terminal screen to see the git version being installed by Homebrew. To see the correct brew git version(2.43.0) in your case: exit the Terminal and restart the Terminal, then check git version(assumption is that the path is set correctly). Otherwise, helpful video.
best video ..very clear..
Thank you! It really helped me 😍
Thank you man
I love the fact that you explained difference between git and github even though you did not have to but cleared it up. Love that
Thanks so much!
Very good Video!! Thanks !!
Thanks!
the best man
Nice video. I solved my problem with this .
Glad to hear that!
hi, there is two commands, that you have to apply, in the "Next steps", and y don´t know how to end the installation.
Sorry i am from Chile, and I´m novice in terminal and english.
Best video
Thanks!
thanks
You're welcome!
in my terminal instead of installing Homebrew, why did the terminal tell me that The Xcode Command Line Tools will be installed?
You'll want to follow the prompt to install those too. On Mac there's not much you can do without the Xcode Command line tools, and you need them to run certain software/commands in the terminal (including homebrew). Sometimes they are already installed by default, other times they are not in which case you'll need to follow the prompt and install them.
Are you sure? Isn't 'git version 2.39.3 (Apple Git-145)' the system's original git? Typing 'which git', it;s in /usr/bin/git, not homebrew directory
After the installation of Git using homebrew quit the terminal and reopen it. Then you can see the latest version without Apple. Then if you type which git then you can see homebrew directory
please help;
zsh: command not found: brew--version
zsh: command not found: brew--version
export PATH=/opt/homebrew/bin:$PATH
now check. I hope it will solve
oh my god. ive been watching yt tutorials for a whole week trying to update my git and it just keeps saying my version is 2.15.0..WTF? Literally nothing is working and ive searched stack overflow and yt for hours trying to figure this out. Is anyone else going through the same thing?
Did you install via brew install git? Sometimes you need to link it via: brew link --force git@2.34 (or whatever version you installed). Then restart your terminal.
And if that still doesn't work update your path variable in .zshrc or .bash_profile: PATH="/usr/local/opt/git@VERSION/bin:$PATH" (replace VERSION with whatever version you installed), then restart terminal
I cant type password
you don't see the password when you type it.
Just write your password and press enter, and it moves on to the next steps. At least, that is what I did.
@@sanjar_yuldashev1331 thank you got it
zsh: command not found: brew
echo 'PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile dont help.
- Run these two commands in your terminal to add Homebrew to your PATH:
1. (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/xxxxxxxxxx/.zprofile
2. eval "$(/opt/homebrew/bin/brew shellenv)"
replace xxxxxxxxxx with your profile name
@@capetechiehub Thanks
@@capetechiehub many thanks!
@@capetechiehub Thanks, the installation itself gave these lines, but I wasn't sure where each began and ended.
Very good video and the explanation is very clear. Thank you.