Git Config
Set your global username
$ git config --global user.name "Your Name"
Set your global email
$ git config --global user.email "you@example.com"
Set default branch name to main
$ git config --global init.defaultBranch main
View all git config settings
$ git config --list

SSH Key Generation
Note: Replace you@example.com with the email linked to your GitHub account.
Generate a new ED25519 SSH key
$ ssh-keygen -t ed25519 -C "you@example.com"
Generate RSA key (fallback for older systems)
$ ssh-keygen -t rsa -b 4096 -C "you@example.com"
View your public key (copy this to GitHub)
$ cat ~/.ssh/id_ed25519.pub

SSH Agent Setup
Start the SSH agent in background
$ eval "$(ssh-agent -s)"
Add your SSH private key to the agent
$ ssh-add ~/.ssh/id_ed25519
List keys added to the agent
$ ssh-add -l

GitHub SSH Test
Tip: After adding your public key to GitHub Settings → SSH Keys, test the connection below.
Test SSH connection to GitHub
$ ssh -T git@github.com
Test with verbose output (debugging)
$ ssh -vT git@github.com