A cheatsheet for git and github absolute beginner .
Check installed version:
git --version
git -v
Download Code for another repo:
git clone <url-from-github>
Create new repo:
git init
Check repo status:
git status
Add files to repo:
git add <filename>
Example: git add index.html
Add ALL files with: git add .
Discard Changes:
git restore <filename>
Link a local repo to GitHub:
git remote add origin <gh-url>
git push -u origin master
Ignored File :
Files that match a pattern or exact match in .gitignore.