To install brew on Mac OS M
series Chips
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Press enter for installing brew
- brew help
if it shows
zsh: command not found: brew
cd
⇒ ls
⇒ if you don’t see .zshrc
file then create a new one
- brew is installed in this directory
ls /opt/homebrew/bin ⇒ brew
- to add brew
nano .zshrc
- in the .zshrc file
export PATH=”/opt/homebrew/bin:$PATH”
- then
control + x
→ Y → enter
- ls -al
- cat .zshrc will show you the content of that file
- source .zshrc (loads the binary path to current terminal)
- brew -v to see the version
To install git on macOS
- $ brew install git
- git -version