Watch: Stop committing node_modules and junk files | Vovy

Watch Vovy do it on a Mac: "My repo has node_modules and .DS_Store in it, clean it up with a proper .gitignore". Vovy writes a .gitignore for your stack, removes already-tracked junk like node_modules and .DS_Store from Git, and keeps the files on your Mac.

"My repo has node_modules and .DS_Store in it, clean it up with a proper .gitignore"

Vovy writes a .gitignore for your stack, removes already-tracked junk like node_modules and .DS_Store from Git, and keeps the files on your Mac.

What happens in the video

  1. Find tracked junk: Vovy lists files Git is tracking that should not be there, like node_modules, dist builds, .DS_Store and .env files.
  2. Write the .gitignore: Vovy creates a .gitignore tuned for your framework. It is a list of patterns Git will pretend do not exist.
  3. Untrack without deleting: Vovy runs git rm -r --cached on the junk, which removes it from Git but leaves it on your Mac.
  4. Commit and push: Vovy commits the cleanup and pushes, so your repo on GitHub shrinks and clones get faster.
  5. Show what is ignored: A card lists each ignore rule with a one-line reason, and flags any .env files that need their keys rotated.
Read the step-by-step guide