Git & GitHub
/Beginner
What is Git?
Definition
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Explain Like I'm New
Imagine playing a video game where you can save your progress at any time. If you make a bad decision, you can just load an old save file. Git is exactly that, but for your code. It keeps a perfect historical record of every change you've ever made.
Real World Example
Writing a book. Instead of saving files like 'book_v1.doc', 'book_final.doc', and 'book_final_FINAL_v3.doc', you just have one 'book.doc' and Git remembers all previous versions for you.
Common Use Cases
- •Tracking changes over time
- •Collaborating with other developers without overwriting their code
- •Reverting code when a bug is introduced
Terminal Output
bash / terminal
// No code for this conceptual topic, but think of Git as a timeline!
// v1.0.0 (Initial Release) ──> v1.1.0 (Added Feature) ──> v1.2.0 (Fixed Bug)
console.log('Git tracks this timeline!');
Interview Questions
basic
- Who created Git?
intermediate
- What does it mean that Git is 'distributed'?