Git
Browse posts in this category.
Git Fundamentals: Staging, Commits, and the Repository Model
A folder named final_v2_ACTUAL_fixed_USE_THIS is what version control looks like when nobody's using version control. Understanding what init, add, and commit actually do — and why a staging area exists at all — is the difference between typing commands and using the tool.
Branching and Merging: Fast-Forwards, Three-Way Merges, and Real Conflicts
Two branches merge instantly nine times out of ten, then one day Git stops and asks you to resolve a conflict by hand. Understanding what a branch actually is — a movable pointer, not a copy of the project — explains both cases from the same underlying mechanism.
Interactive Rebase, Squashing, and Rewriting History Safely
A pull request with fourteen commits named "wip", "fix", and "actually fix" tells a reviewer nothing about what changed or why. Interactive rebase turns that into a small number of meaningful commits — as long as you know the one rule about which commits are safe to rewrite.
Undoing Changes: restore, reset, revert, and stash
Git has four different ways to undo something, and they are not interchangeable. Using the wrong one is how "undo my last commit" turns into "where did my work go" — understanding what each command actually moves (working directory, staging area, or history) fixes that.
Reflog, Bisect, and Blame: Recovering Lost Work and Finding Bugs
A "lost" commit after a bad reset or force-push is almost never actually gone. git reflog keeps a local record of everywhere HEAD has pointed, bisect turns "somewhere in these 200 commits" into a 10-second binary search, and blame turns "who wrote this" into an actual answer.
Remotes, Fetch vs. Pull, and the Fork-and-PR Workflow
Fetch and pull look interchangeable until the day pull silently creates a merge commit you weren't expecting. Understanding what a remote-tracking branch actually is explains the difference, and sets up how forking, upstream, and pull requests fit together.