Setting Up Git On Mac: Resolving "brew Command Not Found" Error
To fix "zsh: command not found: brew" error, add homebrew to PATH variable by running `export PATH="/opt/homebrew/bin:$PATH"` and confirm with `echo $PATH`. Then run `brew install git` again.
My first time setting up git on my Macbook was a few years ago. My second time was this week, and I faced the same error I faced the first time, except I didn't take note of how I fixed it. So I am writing this short article, hoping that the next time I face this issue again, I know where to find a possible solution. So basically, I'm writing this for me. However, if anyone else faces this error and this helps them too, then that is a bonus. Setting up git on a new laptop 1. Go to the git download page here. Download the appropriate version according to your device. Since I am usin...