■ Git & GitHub Visual Cheatsheet
■ Git vs GitHub
Git (Local) GitHub (Remote)
■ Personal notebook for code versions ■■ Cloud platform to share/collaborate
Track history, branches, commits Host repos, PRs, issues, CI/CD
■ Stage, Commit, Push Analogy (Assignment Example)
• Working Directory → Rough draft of answers
• Stage (`git add`) → Put ready answers aside
• Commit (`git commit`) → Copy to final notebook with note
• Push (`git push`) → Submit notebook to professor (GitHub)
■ Stash Analogy
■ Like hiding unfinished homework in a drawer to continue later.
■ Branch & Merge Analogy
• Branch → Photocopy of notebook to try new ideas safely
• Merge → Copy best answers back into main notebook
• Merge Conflict → Two people edited the same answer differently → decide what to keep
■ Git Workflow (Visual Flow)
Working Directory Stage Commit Push
Edit files git add git commit -m git push
■ Draft work ■ Ready to commit pile ■ Final copy with note ■■ Upload to GitHub