Run database migrations (or any command) automatically when git pull changes specific files.
Git Pull Watched saves you from the "Why is my app crashing?" loop. It watches for changes in your codebase—specifically ignoring your own manual edits—and notifies you when an external change (like a git pull) touches sensitive files like schema.prisma or migration scripts.
✨ Features
👀 Smart Detection: Distinguishes between your manual saves (ignored) and external changes like git pull or branch switching.
⚡️ Debounced Notifications: Groups multiple file changes into a single, clean notification.
🚀 Pre-configured: Works instantly for Prisma and Mongo projects.
🔧 Highly Configurable: Add your own rules for any file pattern and command.
🚀 Usage
Just install the extension. It will immediately start watching for changes to standard migration files.
When you run git pull and new migrations arrive:
The extension detects the change.
A notification appears: "Watched files changed. Do you want to run: npm run db:migrate?"
Click Run Command, and it executes in a dedicated terminal.
⚙️ Configuration
The extension comes with sensible defaults, but you can add your own rules in settings.json:
"gitPullWatched.rules": [
// Example: Run a script when Python requirements change
{
"patterns": ["**/*requirements.txt"],
"command": "pip install -r requirements.txt"
},
// Example: Run a build when a specific config changes
{
"patterns": ["config/app-config.yaml"],
"command": "npm run build:config"
}
]