SSH Git Commands Cheat Sheet Simple Guide

Generate a new SSH on Mac

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

After generating add the new SSH key to your GitHub account

Connect via ssh

git -c core.sshCommand="ssh -i ~/.ssh/mac_rsa" clone git@gitlab.com:YourProject/Your.git

Current dir git status

git status

Show checked out branches

git branch