Interactive guide for developers who want to understand the real mechanics, not just the commands.
.git/ folder storing the entire history.a1b2c3d4...push to it and pull from it.Every commit stores a pointer to the project snapshot, the author's name and email, a timestamp, your message, and a pointer to the previous commit. That chain of pointers is what makes Git history work, like a linked list of snapshots.
A branch is just a lightweight pointer to a specific commit. Git is not copying files when you make one. Every new commit moves that pointer forward, while main stays where it was.
Two ways to combine branches, each leaving a different history.
On a team, no one should push straight to main. Pull Requests create a review step so someone else reads the code, asks questions, and approves before anything lands.
Git merges automatically most of the time. Conflicts happen when two branches modify the exact same lines in different ways and Git has no safe way to choose between them.
Keep branches short-lived. Pull from main often so your branch does not drift. Split large files into smaller modules and communicate with teammates about who is touching which surface area.