A lightweight PowerShell utility that automatically detects and pushes git commits when your local branch is ahead of the remote. Runs as a system tray application with pause/resume controls and notifications.
- Automatic Detection — Polls repositories every 5 minutes (configurable) for unpushed commits
- System Tray Icon — Green icon when running, gray when paused
- Pause/Resume — Right-click menu to pause detection without exiting
- Notifications — Toast notifications on successful push or failure
- Logging — Tracks push events to a log file (only logs actual pushes, not checks)
- Multi-Repo — Monitor multiple repositories from a single config
- Auto-Start — Optional startup on Windows login (configurable)
- Clean Tray — Runs silently in system tray with no taskbar flashing
-
Save these files to
C:\Users\<username>\.local\bin\(or any directory in your PATH):autopush.ps1— Main applicationrun-autopush.ps1— Optional launcher scriptautopush-config.json— Configuration fileautopush_running.ico— Running state iconautopush_paused.ico— Paused state icon
-
Edit
autopush-config.jsonwith your repository paths and preferences -
One-time launch:
run-autopushor call directly:
powershell -ExecutionPolicy Bypass -File "C:\Users\<username>\.local\bin\autopush.ps1"
-
Auto-start on login: Set
"autoStart": truein config (creates a startup shortcut automatically)
Edit autopush-config.json:
{
"checkInterval": 300,
"showNotifications": true,
"autoStart": true,
"logFile": null,
"iconRunning": "autopush_running.ico",
"iconPaused": "autopush_paused.ico",
"repositories": [
{
"path": "C:\\path\\to\\repo",
"branch": "main",
"enabled": true
}
]
}Options:
checkInterval— Seconds between checks (default: 300 = 5 minutes)showNotifications— Enable toast notifications (true/false)autoStart— Create startup shortcut on first run (true/false). Set to false to remove.logFile— Path to log file; set to null to disable logging. Relative paths resolve to script directory.iconRunning/iconPaused— Icon file names or paths. Relative paths resolve to script directory.repositories— Array of repos with path, branch, and enabled status. Paths should be absolute. Each branch must have an upstream tracking branch configured (git push -u origin <branch>); repos without one are skipped with a warning.
run-autopush- Pause — Pause checking (toggles to Resume)
- Edit Config — Opens config file in Notepad. Changes take effect on next restart.
- Exit — Stop the app
Push events are logged to the configured log file with timestamp and result:
[2026-04-13 16:45:23] C:\path\to\repo (main): PUSH SUCCESS (3 commit(s))
[2026-04-13 16:50:15] C:\path\to\repo (main): PUSH FAILED (2 commit(s) ahead)
- Windows 7+
- PowerShell 5.0+ (or PowerShell 7+)
- Git installed and in PATH
- .NET Framework 4.5+
- Only works on Windows
MIT