Skip to main content

Why Use Git Sync?

Auk uses Git as the collaboration and backup solution instead of cloud services: Full Control - Choose any Git service (GitHub, GitLab, self-hosted) ✅ Version History - Complete change history and rollback capability ✅ Team Collaboration - Standard Git workflows ✅ Offline Work - Local changes, sync when needed ✅ Data Security - Data stored on servers you control

How It Works

Supported Git Services

  • GitHub - Public/private repositories
  • GitLab - Self-hosted or GitLab.com
  • Gitee - Chinese Git service
  • Bitbucket - Atlassian Git service
  • Self-hosted Git - Any standard Git server

Prerequisites

Before setting up Git sync, you need:
  1. Git installed on your system
  2. Git repository created on your chosen service
  3. Authentication configured (SSH keys or access token)

Check Git Installation

Authentication Methods

SSH keys provide secure, password-less authentication.
1

Generate SSH Key

2

Add to SSH Agent

3

Copy Public Key

4

Add to Git Service

GitHub:
  1. Go to Settings → SSH and GPG keys
  2. Click “New SSH key”
  3. Paste your public key
  4. Click “Add SSH key”
GitLab:
  1. Go to Preferences → SSH Keys
  2. Paste your public key
  3. Click “Add key”
5

Test Connection

HTTPS with Personal Access Token

For HTTPS authentication, use a personal access token.
  1. Go to Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Click “Generate new token (classic)”
  3. Select scopes: repo (full control of private repositories)
  4. Click “Generate token”
  5. Copy the token (you won’t see it again!)

Create Git Repository

Before configuring Auk, create a repository on your Git service:

Configure Git in Auk

Now configure Git sync in your workspace:
1

Open Workspace Settings

  1. Click workspace selector at the top
  2. Click the gear icon next to your workspace
  3. Or use keyboard shortcut: Cmd/Ctrl + ,
2

Enable Git Sync

  1. Navigate to “Git Sync” section
  2. Toggle “Enable Git Sync” to ON
3

Configure Repository

Remote URL:
Branch:
(or master for older repositories)
4

Configure Authentication

  • Select “SSH” as authentication method
  • SSH keys are automatically used from your system
  • If you have a passphrase, you’ll be prompted to enter it
5

Test Connection

Click “Test Connection” to verify:
  • Repository is accessible
  • Authentication works
  • Branch exists
If successful, you’ll see: ✅ “Connection successful”
6

Initial Sync

Choose initial sync method:Option 1: Push Local Data
  • Use if you have existing collections in Auk
  • Pushes your local data to empty repository
Option 2: Pull Remote Data
  • Use if repository already has data
  • Downloads data from repository to Auk
Option 3: Merge
  • Use if both local and remote have data
  • Attempts to merge both datasets
7

Configure Auto Sync

Auto Sync Interval:
  • 5 minutes (frequent updates)
  • 15 minutes (balanced)
  • 30 minutes (less frequent)
  • 60 minutes (hourly)
  • Manual only (no auto sync)
Sync on Changes:
  • Enable to sync immediately after changes
  • Disable to sync only at intervals

Verify Git Sync

After configuration, verify Git sync is working:
  1. Check Sync Status
    • Look for Git icon in workspace selector
    • Should show “Synced” or last sync time
  2. Make a Change
    • Create a new collection or request
    • Wait for auto sync or click “Sync Now”
  3. Check Repository
    • Visit your Git repository on the web
    • You should see your collections in collections/ folder
  4. Test from Another Device
    • Install Auk on another device
    • Create workspace with same Git repository
    • Your collections should appear

Git Workflow

Daily Workflow

Manual Sync

If you prefer manual control:
  1. Disable auto sync in settings
  2. Make your changes
  3. Click “Sync Now” when ready
  4. Review changes before pushing

Branch Workflow

For larger changes, use branches:
  1. Create a new branch in workspace settings
  2. Make your changes
  3. Push branch to remote
  4. Create pull request on Git service
  5. After merge, switch back to main branch

Troubleshooting

Authentication Failed

SSH:
HTTPS:
  • Verify token has correct permissions
  • Check token hasn’t expired
  • Try regenerating token

Push Rejected

Problem: “Updates were rejected because the remote contains work” Solution:

Merge Conflicts

Problem: “Merge conflict detected” Solution:
  1. Auk will show conflict resolution dialog
  2. Choose resolution strategy:
    • Keep local changes
    • Use remote changes
    • Manual merge
  3. After resolving, sync again

Large Files

Problem: “File too large” error Solution:
  • Git has file size limits (usually 100MB)
  • Don’t commit large files (videos, images, etc.)
  • Use .gitignore to exclude them
  • Consider Git LFS for large files

Slow Sync

Problem: Sync takes too long Solution:
  • Check network connection
  • Reduce auto sync frequency
  • Use shallow clone for large repositories
  • Consider splitting into multiple workspaces

Best Practices

Repository Organization

.gitignore Template

Commit Messages

Auk auto-generates commit messages:

Team Collaboration

  1. Communicate - Tell team before major changes
  2. Sync Often - Reduce merge conflicts
  3. Use Branches - For experimental changes
  4. Review Changes - Check diffs before pushing
  5. Document - Add README to repository

Advanced Configuration

Multiple Remotes

Configure multiple Git remotes:

Custom Git Commands

Run custom Git commands in workspace directory:

Hooks

Set up Git hooks for automation:

Next Steps

Conflict Resolution

Learn how to resolve merge conflicts

Branch Management

Work with Git branches

Team Collaboration

Best practices for team collaboration

Troubleshooting

Common Git sync issues