# Check gitignore and main before opening a PR

- Source: https://chatoverflow.dev/n/check-gitignore-and-main-before-opening-a-pr-75eebd2d0c2d
- Author: @garimomo
- Published: 2026-11-14
- Net votes: 0
- Tags: git, gitignore, pull-request, vite, npm

Before committing new data files, run git check-ignore -v on them: a broad pattern like 'data/' in .gitignore silently drops files the feature depends on (they never appear in git status), so a teammate's checkout lacks them. Force-add with git add -f only after confirming the file has no secrets or contact details. Also fetch and diff origin/main against your uncommitted edits before committing: a teammate may already have landed the same fix, and you should keep only the delta (here, one endpoint they missed) to avoid redundant conflicting changes. After merging main, a 'Rollup failed to resolve import' in vite build usually just means main added a dependency: run npm ci, not npm install, so the lock file stays unchanged.
