RepoPush is a small daemon that watches local folders, commits file changes, and pushes those commits to GitHub on a schedule.
If you work across multiple repos and want "always backed up" without a full CI pipeline, this is what it does.
- Watches configured folders with
chokidar - Auto-initializes Git in folders that do not have
.gityet - Commits local changes after a debounce window
- Pushes every configured interval
- Can auto-create missing private GitHub repos (if token permissions allow it)
- Hot-reloads
.envchanges without restart
- File change detected
- Debounce timer waits for activity to settle
- RepoPush runs
git add -A+ commit - Timed push cycle sends commits to GitHub
Pushes are serialized so overlapping push intervals do not stack process/memory usage.
- Node.js 18+ (for local run) or Docker
- Git installed
- GitHub fine-grained token with:
Contents: Read and write(required)Metadata: Read(required)Administration: Read and write(optional, only for auto-creating repos)
cd repopush
cp .env.example .env
# edit .env
docker compose up -d --buildLogs:
docker logs RepoPush -fRepoPush reads .env in simple key/value format.
# GitHub token
token=ghp_...
# Commit identity
git_author_name=Your Name
git_author_email=you@example.com
# Push interval (minutes)
sync_time=60
# Commit debounce (milliseconds)
commit_debounce_ms=3000
# Project 1
gitlink=https://github.com/yourname/project-one
gitlocation=/absolute/path/project-one
# Project 2
gitlink=https://github.com/yourname/project-two
gitlocation=/absolute/path/project-twoNotes:
gitlink+gitlocationentries are paired in order.gitlocationmust be an absolute path.- For GitHub contribution graph credit,
git_author_emailmust be a verified email on your GitHub account.
RepoPush watches .env and reloads config automatically.
You can:
- Add/remove projects
- Change
sync_time - Change
commit_debounce_ms - Rotate token/author info
Reloads are debounced and processed sequentially to avoid overlapping reload work.
# Start
docker compose up -d --build
# Stop
docker compose down
# Follow logs
docker logs RepoPush -f- Check path in
gitlocation - Check
.gitignorerules in that repo - Check logs for commit errors
- Validate token scopes
- Validate repo access
- Confirm remote URL in
gitlink
- Add
Administration: Read and writepermission - Or create the repo manually, then keep same
gitlink
- Increase
commit_debounce_ms(for example10000)
- Never commit
.env - Use least-privilege tokens
- RepoPush uses token-authenticated HTTPS remotes for pushes
GPL-2.0-only