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.

КОМЕНТАРІ • 45

  • @phillegg15
    @phillegg15 Місяць тому +1

    Excellent - thanks for the clear explanation

  • @salimam2642
    @salimam2642 5 місяців тому +1

    Excellent video. Thank you.

  • @draweraku4558
    @draweraku4558 Місяць тому +1

    bro thank you so much it was an easy to follow tutorial

  • @DEMIR_DUK
    @DEMIR_DUK Місяць тому +1

    Thx for excellent explanation.

  • @ramonvalentim4392
    @ramonvalentim4392 Місяць тому +1

    nice video, thanks from Brazil

  • @fabiocuevas3997
    @fabiocuevas3997 18 днів тому

    Thanks a lot for your video, im from Mexico and any video in Spanish is good like this one that you made

  • @bicaelfrancisco9043
    @bicaelfrancisco9043 10 днів тому

    Very good video and the explanation is very clear. Thank you.

  • @user-kc6wj7wr6i
    @user-kc6wj7wr6i 5 місяців тому

    Thanks for the video on MAC.

  • @karenoliveira5782
    @karenoliveira5782 3 місяці тому +1

    loved the video

  • @bellingtonmakoba164
    @bellingtonmakoba164 5 місяців тому +7

    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.

  • @ranjanadissanayaka5390
    @ranjanadissanayaka5390 6 місяців тому

    best video ..very clear..

  • @elvirakharunova1589
    @elvirakharunova1589 4 дні тому

    Thank you! It really helped me 😍

  • @aminemerad2718
    @aminemerad2718 25 днів тому +1

    Thank you man

  • @temobgarashvili5676
    @temobgarashvili5676 6 місяців тому +4

    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

  • @sivaramjallu001
    @sivaramjallu001 5 місяців тому

    Very good Video!! Thanks !!

  • @shp3343
    @shp3343 6 днів тому

    the best man

  • @nikhildeka8357
    @nikhildeka8357 3 місяці тому +1

    Nice video. I solved my problem with this .

  • @lucianolagosbecerra3250
    @lucianolagosbecerra3250 8 днів тому

    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.

  • @sulaimandev
    @sulaimandev 6 місяців тому

    Best video

  • @sabatauqeer1
    @sabatauqeer1 2 місяці тому

    thanks

  • @raghadf9188
    @raghadf9188 6 місяців тому

    in my terminal instead of installing Homebrew, why did the terminal tell me that The Xcode Command Line Tools will be installed?

    • @code_wizard
      @code_wizard  6 місяців тому +1

      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.

  • @mashiro3696
    @mashiro3696 3 місяці тому +1

    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

    • @sivakumarm3569
      @sivakumarm3569 15 днів тому

      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

  • @j1mm1eK1ngs
    @j1mm1eK1ngs 2 місяці тому +1

    please help;
    zsh: command not found: brew--version
    zsh: command not found: brew--version

  • @cenme4536
    @cenme4536 4 дні тому

    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?

    • @code_wizard
      @code_wizard  4 дні тому

      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.

    • @code_wizard
      @code_wizard  4 дні тому

      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

  • @naturesrevolution
    @naturesrevolution 4 місяці тому +1

    I cant type password

    • @sanjar_yuldashev1331
      @sanjar_yuldashev1331 4 місяці тому +3

      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.

    • @naturesrevolution
      @naturesrevolution 4 місяці тому

      @@sanjar_yuldashev1331 thank you got it

  • @user-by4vv5nv4v
    @user-by4vv5nv4v 4 місяці тому +8

    zsh: command not found: brew
    echo 'PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile dont help.

    • @capetechiehub
      @capetechiehub 2 місяці тому +3

      - 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

    • @vaibhavrane6899
      @vaibhavrane6899 2 місяці тому

      @@capetechiehub Thanks

    • @KKarl23
      @KKarl23 Місяць тому

      @@capetechiehub many thanks!

    • @davidrenoz
      @davidrenoz Місяць тому

      ​@@capetechiehub Thanks, the installation itself gave these lines, but I wasn't sure where each began and ended.

  • @bicaelfrancisco9043
    @bicaelfrancisco9043 10 днів тому

    Very good video and the explanation is very clear. Thank you.