3

I need some help, I had a version of git installed a while back (not sure how) not using homebrew. I just installed with homebrew and I'm not sure how to use the new one instead of the old one. Ideas? Thanks in advance

$ which -a git
/usr/local/bin/git
/usr/bin/git
/usr/local/bin/git

$ which git
/usr/local/bin/git

$ /usr/bin/git --version
git version 1.7.5.4

$ /usr/local/bin/git --version
git version 1.8.4

$ git --version
git version 1.7.5.4
ThomasReggi
  • 55,053
  • 85
  • 237
  • 424
  • 2
    use absolute paths, or edit your $PATH to make the directory of whichever version you want to use show up FIRST in the path. – Marc B Oct 07 '13 at 18:16
  • I just deleted the git files from the folder/version I didn't want/need. – dizzyguy Nov 14 '22 at 22:03

1 Answers1

5
export PATH=/usr/local/bin:$PATH
FelipeC
  • 9,123
  • 4
  • 44
  • 38
  • Should I uninstall the git in `/usr/bin/git` or just leave it there? I believe I install it when installing cmd line tools. If so, how should I uninstall properly? – steven Sep 12 '22 at 00:15