A
A
akabeerka2021-01-25 19:52:05
git
akabeerka, 2021-01-25 19:52:05

How to switch to a new version of git on mac OS?

Hello! Please tell me how to switch to git installed via homebrew on a poppy.
I tried to write $ sudo mv /usr/bin/git /usr/bin/git-applein response received

mv: rename /usr/bin/git to /usr/bin/git-apple: Operation not permitted

$ brew upgrade git
Updating Homebrew...
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 3 formulae.

Warning: git 2.30.0 already installed

$ git --version
git version 2.19.2

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
iMaximus, 2021-01-25
@iMaximus

1. Type
open ~/.bash_profile in the terminal
2. In the window that opens, add the line
export PATH="/usr/local/bin:${PATH}"
Save and close
3. Type
source ~/.bash_profile in the terminal
Hooray, the version has changed !

A
AVKor, 2021-01-25
@AVKor

Put in PATH so that the OS finds the new version before the old one.

A
akabeerka, 2021-01-25
@akabeerka

Why is the version still the same?
600f0fc37def0579850122.png
600f0fd036037017258823.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question