fix-gitignore

Add useful missing rules to .gitignore files.

Usagegit-wrangler fix-gitignore [options]

Quick start

git-wrangler fix-gitignore

What it does

fix-gitignore detects the languages and tools used by each repository, then suggests ignore rules for generated files that actually exist. It adds only missing rules and never removes existing ones.

The command previews all proposed changes and asks once before editing files. It does not stage or commit the changes.

Options

Option Default What it does
--repo <path> Whole workspace Update exactly one repository.
--yes, -y Off Skip the confirmation after the preview.
--guided Off Choose options through prompts.

More examples

# Check one repository
git-wrangler fix-gitignore --repo ./api

Files that are already tracked stay tracked even after an ignore rule is added.

  • Use untrack after this command to stop tracking files covered by the new rules.
  • Use commit to commit the .gitignore changes.