Dev Cheat Sheet

Quick-reference notes for things I always look up.

Conventional Commits

Commit message prefixes from the Conventional Commits spec. feat and fix are the only types that directly affect the semver version.

feat:Introduces a new feature.(MINOR)
fix:Patches a bug in existing code.(PATCH)
build:Changes to the build system or external dependencies.
chore:Routine maintenance; no production code change.
ci:CI/CD configuration files and scripts.
docs:Documentation changes only.
style:Formatting or whitespace — no logic changes.
refactor:Restructured code; no new feature or bug fix.
perf:A change that improves performance.
test:Adds or corrects tests.

Git Commands

Everyday git workflow commands.

git checkout <branch>-b

Switch to a branch. Add -b to create it first.

git add .

Stage all changes in the working directory.

git commit -m "<msg>"

Commit staged changes with a message.

git pull

Fetch and merge from the tracked remote branch.

git pull origin main

Fetch and merge from origin/main explicitly.

git fetch

Download remote changes without merging.

git push

Push commits to the remote.

Yarn

Common Yarn package manager commands.

yarn

Install all dependencies.

yarn dev

Start the development server.

yarn build

Build for production.

yarn start

Run the production build.

yarn add <pkg>

Add a dependency.

yarn add -D <pkg>

Add a dev dependency.

yarn remove <pkg>

Remove a package.

Hex Color from Image (Mac)

Pick a color from anywhere on screen and get its hex value.

1

Open Digital Color Meter (Spotlight: ⌘ Space)

2

Hover over the color, then press ⇧⌘C to copy the color values

Pro tip

In Digital Color Meter, go to View → Display Values to switch between RGB and Hexadecimal values