If you’re working on a Mac and want to set up Git, Node.js, and NPM without using Homebrew, this guide will walk you through it using official and lightweight methods.
Contents
.dmg
file..dmg
and run the installer .pkg
.git --version
✅ You should see something like: git version 2.39.3
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
.zshrc
(or .bashrc
if using Bash): bashCopyEdittouch ~/.zshrc open -e ~/.zshrc
Add the following lines: bashCopyEditexport NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
source ~/.zshrc
nvm
is working: bashCopyEditcommand -v nvm
✅ You should see: nvm
nvm install 20
nvm use 20
node -v npm -v
✅ You should see versions like: CopyEditv20.x.x 10.x.x
If you plan to use GitHub with SSH:
bashCopyEditssh-keygen -t ed25519 -C "your_email@example.com"
eval "$(ssh-agent -s)"
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
Then copy your key:
bashCopyEditcat ~/.ssh/id_ed25519.pub
And paste it into GitHub under
👉 Settings → SSH and GPG keys → New SSH Key
You now have:
Have any questions or comments? Write them below!