Back to The Void

GitBash Cheat Sheet

January 31st 2022

Generating ssh key:
Step1: mkdir ~/.ssh :Creates secretkey hidden directory
Step2: cd ~/.ssh :Enter secretkey hidden directory
Step3: ssh-keygen.exe :generate public & private rsa key pair
Step4: Enter file path in which to save your ssh key :leave empty for current directory
Step5: Enter passphrase :Press enter to leave as None
Step6: cat :Retrieve public ssh key
Step7: Add to GitHub

Pushing repository to GitHub (intial):
Step1: Create repository
Step2: cd to project folder in gitbash
Step3: git remote add origin{RESPOSITORY-NAME}.git
Step4: git branch -M main
Step5: git push -u origin main

Pushing repository changes to GitHub:
Step1: git add .
Step2: git commit -am "{MESSAGE}"
Step3: git push