0% found this document useful (0 votes)
15 views1 page

Git Cheatsheet Visual

The document provides a visual cheatsheet comparing Git and GitHub, highlighting Git as a local version control tool and GitHub as a cloud platform for collaboration. It explains key concepts such as staging, committing, and pushing changes, using analogies for better understanding. Additionally, it covers stashing, branching, merging, and resolving merge conflicts in a Git workflow context.

Uploaded by

valadevang071
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

Git Cheatsheet Visual

The document provides a visual cheatsheet comparing Git and GitHub, highlighting Git as a local version control tool and GitHub as a cloud platform for collaboration. It explains key concepts such as staging, committing, and pushing changes, using analogies for better understanding. Additionally, it covers stashing, branching, merging, and resolving merge conflicts in a Git workflow context.

Uploaded by

valadevang071
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

■ 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

You might also like