Pages

Topics

Tools

↑↓navigate↵openescclose

All syntax guides

Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.

3,965 guides across 14 topics

Topics

Latest guides

3D illustration of commit blocks lifted onto a new base line and fused into one cube
Git

Git Interactive Rebase: Squash, Fixup, and --onto Workflows

Rebase replays commits onto a new base; --onto moves only a subset. Autosquash folds fixups without editing the todo list, and force-with-lease makes the result shareable.

GitRebaseHistoryCLI
3D illustration of two branch tracks joining with one conflict chip resolved
Git

Git Merge: Fast-Forward, Three-Way, and Conflict Resolution

Fast-forward moves a pointer; a three-way merge compares both tips to a merge base. Where ours and theirs invert, and why a squashed merge blocks re-merging.

GitMergeConflictsCLI
3D illustration of branch lines with a HEAD pointer floating free and a rescue arrow
Git

Git switch, checkout, and Detached HEAD Recovery

switch moves HEAD, restore touches files, checkout does both badly. How to leave a detached HEAD with your commits intact, and how to get back.

GitBranchingCLIRecovery
3D illustration of file cards moving through working, staging and commit trays
Git

Git Staging Area: status, add -p, commit --amend, and Partial Commits

The index is what a commit actually contains, which makes partial commits possible and commit -a dangerous. What amend rewrites, and when that is safe.

GitCommitStagingCLI
3D illustration of a local repository cube connected by a cable to a cloud remote cube
Git

Git Remote and Upstream Tracking: init, clone, and Branch Relationships

An upstream is a config line, not a copy of a branch. Why pull refuses to run, what a shallow clone breaks, and how origin and upstream differ in a fork.

GitRemoteBranchingCLI
3D illustration of request arrows hitting a config panel that splits into redirect, rewrite and header routes
Next.js

Next.js Redirects, Rewrites, and Headers in next.config.ts

Redirect changes the URL, rewrite masks it, headers ride on the response — all evaluated in a fixed order before routing. Permanent means cached in browsers, not just in Google.

Next.jsConfigurationRoutingSEO
3D illustration of static HTML cards beside a shipping container with a package cube inside
Next.js

Next.js Static Export, Standalone Output, and Docker Deployment

Export has no server, standalone has a pruned one, and the default expects a full install. The three COPY lines that decide whether a container renders CSS.

Next.jsDeploymentDockerBuild
3D illustration of a split platform with globe edge nodes on one side and a server rack on the other
Next.js

Next.js Edge Runtime vs Node.js Runtime: Limits, Latency, and Use Cases

Edge gives near-zero cold starts and Web APIs only; Node gives sockets, files, and a fixed region. Why database work belongs on Node, and what fails at build time.

Next.jsEdge RuntimeDeploymentPerformance
3D illustration of a URL bar wired to navigation hooks as modules feeding page cards
Next.js

Next.js Link and Router: useRouter, usePathname, and useSearchParams

Client navigation goes through Link and the router hooks, the server uses redirect(). The Suspense requirement, prefetch cost, and query string handling that breaks first.

Next.jsNavigationApp RouterReact
3D illustration of a test pyramid with a browser window running an end-to-end test
Next.js

Testing Next.js: Vitest for Server Components and Playwright for the Rest

Async Server Components cannot render in jsdom, so awaiting the component is the unit test and a real browser is the integration test. What each layer actually proves.

Next.jsTestingVitestPlaywright