Git / HTTP
Everyday git commands, status codes, and REST conventions.
Git commands for daily work
gitbranchcommitNinety percent of git use is this handful of commands. Learn `switch` and `restore` — they split the overloaded `checkout` into two clear jobs.
Undoing things in git
gitresetrevertPick by blast radius: `restore` for files, `reset --soft` to re-do a commit message, `revert` for anything already pushed, `reflog` when you think work is gone.
HTTP status codes worth memorizing
httpapistatus2xx succeeded, 3xx go elsewhere, 4xx the caller is wrong, 5xx the server is wrong. These are the ones that come up in real APIs.
REST basics
restapihttpNouns in the path, verbs in the method. GET must be safe and cacheable, PUT/DELETE idempotent, POST neither.
HTTP headers that matter
httpcachecorsCaching and content negotiation live in headers. `Cache-Control` decides whether your CDN does any work at all.