I have installed git from homebrew, and instead of installing it in /usr/local/bin it's in /opt/homebrew/bin/git, how can I move it?
I've changed my $PATH variable to /usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/bin:/bin:/usr/sbin:/sbin
(previously /usr/local/bin
wasn't at the begging) and tried to reinstall through homebrew with no results.
Also, I currently have this two versions of git:
git is `/opt/homebrew/bin/git` (2.33.0)
git is `/usr/bin/git.` (2.30.1 (Apple Git-130))
If I am correct, the /usr/bin/git
version is the native one.
Is anyone able to help me or should I resign myself to having git there?
Thanks in advance!
From https://docs.brew.sh/Installation
This script installs Homebrew to its preferred prefix (
/usr/local
for macOS Intel,/opt/homebrew
for Apple Silicon and /home/linuxbrew/.linuxbrew for Linux) ...
So assuming you have an M1 Mac it‘s installed where it is supposed to be.