Skip to content
xiaotaitechPublic

About

Android app to sync GitHub repos to local folders (Obsidian-friendly)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

GitSync

中文文档

Build APK Latest Release Android License

An Android app that syncs GitHub repositories to local folders — designed for Obsidian users who want Git-backed vaults without a desktop.

Features

  • Add GitHub repos via Personal Access Token (PAT)
  • Two-way sync: auto-commit local changes, rebase, and push
  • Conflict detection with a resolution dialog
  • Background sync via WorkManager
  • Sync log with per-repo history
  • Material 3 UI (dark/light theme)

Tech Stack

  • Language: Kotlin
  • UI: Jetpack Compose + Material3
  • Git: JGit 6.9.0 (no system Git required)
  • DI: Hilt
  • DB: Room + DataStore
  • Background: WorkManager

Getting Started

Prerequisites

Build

./gradlew assembleDebug

The APK will be at app/build/outputs/apk/debug/app-debug.apk.

Install

adb install app/build/outputs/apk/debug/app-debug.apk

Usage

  1. Open the app and go to Settings → enter your GitHub PAT
  2. Tap + to add a repository (owner/repo + local folder)
  3. Tap Sync on any repo card to pull/push changes
  4. Background sync runs automatically via WorkManager

Architecture

app/src/main/java/com/gitsync/
├── data/          # Room entities, DAOs, DataStore prefs
├── di/            # Hilt AppModule
├── git/           # GitSyncManager, ConflictDetector
├── notification/  # SyncNotifier
├── ui/            # Compose screens (repolist, addrepo, settings, synclog, conflict)
├── util/          # SAF helpers, path utils
└── worker/        # SyncWorker (WorkManager + Hilt)

Security Notes

  • PAT is stored in DataStore (not WorkManager InputData) to avoid exposure in job history
  • Never commit your PAT to source control

License

MIT

About

Android app to sync GitHub repos to local folders (Obsidian-friendly)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages