← Back to list

Installing and Configuring Git on Your Mac Like a Boss

How to Install Git and Set It Up on Your Mac Like a Pro

Bhaskar Kumar · 2025-03-01 15:36 · 0 claps · 1.1 min read
#git #git-on-mac #git-configuration #github #set-git-on-mac
Open on Medium ↗
Wiki topics: 🔓 · Open Source

Installing and Configuring Git on Your Mac Like a Boss

How to Install Git and Set It Up on Your Mac Like a Pro

Yo, if you’re coding on a Mac and need Git to keep your projects tight, here’s the quick rundown to get it installed and hooked up with GitHub. Let’s roll!

Step 1: Install Git

Easiest way? Use Homebrew, bro. If you don’t have it, grab it first:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then slam Git on there:

brew install git

Check it’s good:

git --version

You’ll see something like git version 2.44.0 (or whatever’s latest in March 2025).

Step 2: Configure Git Basics

Tell Git who you are so your commits don’t look like they’re from a ghost:

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

Set the default branch to main (keeps it modern):

git config --global init.defaultBranch main
  • Hit Enter twice (no passphrase for simplicity) to save it at ~/.ssh/id_ed25519.
  • Add It to SSH Agent Make it auto-load:
touch ~/.ssh/config

Edit ~/.ssh/config (use nano or whatever) and drop this:

Host github.com
  AddKeysToAgent yes
  IdentityFile ~/.ssh/id_ed25519
  IgnoreUnknown UseKeychain

Load the key:

ssh-add ~/.ssh/id_ed25519

Copy Your Public Key Show it:

cat ~/.ssh/id_ed25519.pub
  • Copy that line (starts with ssh-ed25519).
  • Add It to GitHub
  • Hit GitHub → Settings → SSH and GPG keys → New SSH key.
  • Name it (like “My Mac”).
  • Paste the key, save it.

Test it

ssh -T git@github.com

If you see “Hi [username]! You’ve successfully authenticated,” you’re golden.

Boom, you’ve got Git installed and GitHub wired up with SSH. Clone repos, push code, and flex those commits without breaking a sweat. If something’s funky, hit me up — we’ll fix it, bro!


메타데이터
post_id
963227f8d366
slug
installing-and-configuring-git-on-your-mac-like-a-boss-963227f8d366
url
https://medium.com/@bhaskarkumar.india/installing-and-configuring-git-on-your-mac-like-a-boss-963227f8d366
canonical_url
https://medium.com/@bhaskarkumar.india/installing-and-configuring-git-on-your-mac-like-a-boss-963227f8d366
author_url
https://medium.com/@bhaskarkumar.india
status
ok
fetched_at
2026-07-18 06:18:28