Setup

Git

Setting identity

Set name

git config --global user.name "Your Name"

Set email

git config --global user.email "your_email@example.com"

Use git config --list to check.

Set SSH

  1. Generate the key: ssh-keygen -t ed25519 -C "your_email@example.com"
  2. Start the agent: eval "$(ssh-agent -s)"
  3. Add the key: ssh-add ~/.ssh/id_ed25519
  4. Copy the public key to clipboard to paste it into your GitHub settings: cat ~/.ssh/id_ed25519.pub

Connect to repo

# Initialize the folder as a git project
git init

# Link it to specific GitHub repo (Add brand new connection)
git remote add origin [SSH_LINK_HERE]

# Change an existing connection
git remote set-url origin [SSH_LINK_HERE]