Algocraft / Git Commands
Git Commands
Every command here drives a live commit graph — branches fork in their own color, merges gain real parent edges, rebase visibly rewrites hashes. Step through a guided scenario, or drop into Sandbox mode and run your own.
See the "unborn branch" that exists right after init, and everything clone sets up automatically — full history plus remote tracking.
Watch a file travel through Working Directory → Staging Area → Repository, with git status narrating every stop along the way.
A branch is just a name on a commit. Create one, move HEAD onto it, or detach HEAD onto a raw commit — see exactly what moves and what doesn't.
Toggle between a clean fast-forward and a diverged three-way merge, and watch the two-parent merge commit form node by node.
Replay a branch's commits onto a new base one by one — every replayed commit gets a brand-new hash. Compare it directly against the same history merged.
Click any commit in the graph and copy just that one change onto your current branch — without touching its siblings.
Undo the same mistake two ways side by side: reset --hard rewrites the pointer and dims the abandoned commit; revert adds a safe inverse commit.
Shelve messy uncommitted changes onto a stack, switch branches with a clean working directory, then pop them right back.
Watch a teammate push behind your back, get a rejected non-fast-forward push, then pull (fetch + merge) to reconcile before pushing again.
Pin a permanent name onto a commit — lightweight or annotated — and see checking out a tag drop you into detached HEAD, just like any commit.