AutoPush
Intelligent, local-first Git automation for Visual Studio Code. AutoPush monitors workspace changes, generates conventional commit messages locally using Ollama (gemma3:4b), and safely commits and pushes changes to your GitHub origin remote.
Features
- Automatic Git Synchronization: Watches workspace file changes and debounces edits before staging, committing, and pushing to
origin/<current-branch>.
- AutoPush Dashboard (
AutoPush: Open Dashboard): Clean single-screen Webview showing repository status, branch, remote connection, Automatic Sync toggle, Added/Modified/Deleted file selection, editable Ollama commit message generator, live diff preview, and recent activity.
- Local AI Commit Messages: Generates conventional commit messages locally through your Ollama server (
gemma3:4b by default) with an automatic offline fallback (chore: update N project file(s)) when Ollama is unreachable.
- Push Recovery & Sync Queue: Preserves locally created commits if a push fails, persists pending push state across VS Code restarts, retries existing commits without creating duplicates, and detects branch changes or remote divergence.
- Safety & Secret Protection:
- Never runs
git push --force, git reset --hard, or destructive commands.
- Refuses to commit if merge conflicts, detached HEAD, or unrelated staged changes exist.
- Respects
.gitignore and blocks sensitive files (.env, .env.*, .ssh/, id_rsa, id_ed25519, *.pem, *.key, *.p12, *.pfx, credentials.json, secrets.json, secrets.yaml).
Prerequisites
1. Git & GitHub Remote
- Git installed and available on your system
PATH.
- Git author configured (
git config user.name and git config user.email).
- An initialized Git repository with an
origin remote and working push credentials (Git Credential Manager for HTTPS or SSH keys).
2. Ollama & Gemma 3 4B (Local AI Commit Messages)
- Install Ollama on your machine.
- Pull the default model:
ollama pull gemma3:4b
- Ensure the local Ollama server is running (default:
http://127.0.0.1:11434):
ollama serve
Note: If Ollama is stopped or unreachable, AutoPush still commits and pushes using a safe fallback message (chore: update N project file(s)).
Commands
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
AutoPush: Open Dashboard — Open the AutoPush dashboard panel.
AutoPush: Toggle Automatic Sync — Enable or disable automatic synchronization for the workspace.
AutoPush: Sync Now — Manually commit and push unstaged changes or retry a pending push.
AutoPush: Show Status — Show current AutoPush status and open the AutoPush Output channel.
Extension Settings
This extension contributes the following settings:
| Setting |
Default |
Description |
autopush.autoSync |
false |
Enable automatic commit and push. |
autopush.debounceSeconds |
10 |
Quiet period in seconds before automatic synchronization (3–120). |
autopush.ollamaUrl |
http://127.0.0.1:11434 |
Local Ollama server URL. |
autopush.ollamaModel |
gemma3:4b |
Local AI model used to generate commit messages. |
Known Limitations
- Targets the first open workspace folder (
workspaceFolders[0]) and pushes to the origin remote.
- Automatic sync is disabled by default (
autopush.autoSync: false); enable it per workspace via the status bar, dashboard switch, or command palette.
| |