|
| Feature | Desktop | github.dev |
|---|---|---|
| Auto-commit | Yes | Yes |
| Auto-push | Yes | Yes (atomic with commit) |
| Auto-pull (startup) | Yes | Yes |
| Auto-pull (after idle) | Yes | Yes |
| Conflict / rebase detection | Yes | — |
| File filtering | Yes | Yes |
| Branch exclusion | Yes | Yes |
| Commit on focus loss | Yes | Yes |
| Countdown timer | Yes | Yes |
Installation
From Marketplace (recommended)
Install from the Visual Studio Marketplace, or search "GitNote" in the VSCode Extensions panel.
From source
git clone https://github.com/amaya382/gitnote.git
cd gitnote
npm install
npm run compile
Press F5 in VSCode to launch the Extension Development Host.
Quick start
- Open a workspace containing a Git repository
- Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) → GitNote: Enable - Edit and save files — they will be automatically committed and pushed
The status bar shows the current state: Watching, Committing, Pushing, Pulling, Paused, or Error.
Commands
| Command | Description |
|---|---|
GitNote: Enable |
Enable auto-commit/push/pull |
GitNote: Disable |
Disable automation |
GitNote: Toggle |
Toggle on/off |
GitNote: Sync Now |
Immediately pull, commit, and push |
Configuration
| Setting | Default | Description |
|---|---|---|
gitnote.enabled |
false |
Enable GitNote |
gitnote.commitDelay |
10 |
Delay (seconds) before auto-commit after save |
gitnote.autoPush |
true |
Push to remote after commit |
gitnote.pullOnStartup |
true |
Pull on startup |
gitnote.pullAfterIdle |
true |
Pull on window focus or first interaction after idle |
gitnote.idleThreshold |
30 |
Idle threshold in seconds |
gitnote.filePattern |
"**/*" |
Glob pattern for target files |
gitnote.excludeBranches |
[] |
Branches to exclude |
gitnote.commitMessageFormat |
"GitNote: {timestamp}" |
Commit message template |
gitnote.commitOnFocusLost |
true |
Commit and push pending changes on window focus loss |
gitnote.showCountdown |
true |
Show countdown timer in status bar |
gitnote.conflictBehavior |
"pause" |
"pause" or "notify" on conflicts (desktop only) |
Commit message variables
{timestamp} {date} {time} {branch} {files} {count}
Example: Markdown-only notes repo
{
"gitnote.enabled": true,
"gitnote.filePattern": "**/*.md",
"gitnote.commitDelay": 10,
"gitnote.commitMessageFormat": "note: {date} ({count} files)"
}
How it works
Desktop
File save → Debounce (10s) → Safety checks → Commit → Push
- Change detection — three layers: file save events, repository state changes, and filesystem watcher (for deletions/renames)
- Idle detection — tracks user activity and window focus; if idle for 30s (configurable), regaining window focus or saving a file triggers a pull first
- Safety — mutex-locked operations prevent concurrent git commands; automation pauses during conflicts and rebase; branch checkout cancels pending commits
- Push retry — exponential backoff on failure (30s → 60s → 120s, max 3 attempts)
Browser (github.dev)
File save → Debounce (10s) → Commit (includes push)
- Change detection — file save events only (
createFileSystemWatcheris not available in github.dev) - Atomic commit+push — uses the
remoteHub.commitcommand provided by the GitHub Repositories extension; commit and push happen as a single operation - Auto-pull — pulls on startup and after idle via
remoteHub.pull(if available)
Development
Build
npm install
npm run compile
Test
npm run test # Unit tests
npm run lint # Lint
# Test web extension locally in browser
npx @vscode/test-web --browserType=chromium --extensionDevelopmentPath=./
Publish
# 1. Bump version
npm version patch # or minor / major
# 2. Package
npx @vscode/vsce package
# 3. Publish to VS Marketplace
npx @vscode/vsce publish
# 4. Publish to Open VSX (optional)
npx ovsx publish gitnote-*.vsix -p $OVSX_TOKEN
Compatibility
Works with standard Git repositories and baretree worktree setups. Requires VSCode 1.85.0+.
Acknowledgements
Inspired by GitDoc.