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 controlHow 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:- Git installed on your system
- Git repository created on your chosen service
- Authentication configured (SSH keys or access token)
Check Git Installation
Authentication Methods
SSH Keys (Recommended)
SSH keys provide secure, password-less authentication.Add to Git Service
GitHub:
- Go to Settings → SSH and GPG keys
- Click “New SSH key”
- Paste your public key
- Click “Add SSH key”
- Go to Preferences → SSH Keys
- Paste your public key
- Click “Add key”
HTTPS with Personal Access Token
For HTTPS authentication, use a personal access token.- GitHub
- GitLab
- Gitee
- Go to Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click “Generate new token (classic)”
- Select scopes:
repo(full control of private repositories) - Click “Generate token”
- Copy the token (you won’t see it again!)
Create Git Repository
Before configuring Auk, create a repository on your Git service:- GitHub
- GitLab
- Command Line
Configure Git in Auk
Now configure Git sync in your workspace:Open Workspace Settings
- Click workspace selector at the top
- Click the gear icon next to your workspace
- Or use keyboard shortcut:
Cmd/Ctrl + ,
Configure Authentication
- SSH
- HTTPS
- 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
Test Connection
Click “Test Connection” to verify:
- Repository is accessible
- Authentication works
- Branch exists
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
- Use if repository already has data
- Downloads data from repository to Auk
- Use if both local and remote have data
- Attempts to merge both datasets
Verify Git Sync
After configuration, verify Git sync is working:-
Check Sync Status
- Look for Git icon in workspace selector
- Should show “Synced” or last sync time
-
Make a Change
- Create a new collection or request
- Wait for auto sync or click “Sync Now”
-
Check Repository
- Visit your Git repository on the web
- You should see your collections in
collections/folder
-
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:- Disable auto sync in settings
- Make your changes
- Click “Sync Now” when ready
- Review changes before pushing
Branch Workflow
For larger changes, use branches:- Create a new branch in workspace settings
- Make your changes
- Push branch to remote
- Create pull request on Git service
- After merge, switch back to main branch
Troubleshooting
Authentication Failed
SSH:- 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:- Auk will show conflict resolution dialog
- Choose resolution strategy:
- Keep local changes
- Use remote changes
- Manual merge
- 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
.gitignoreto 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
- Communicate - Tell team before major changes
- Sync Often - Reduce merge conflicts
- Use Branches - For experimental changes
- Review Changes - Check diffs before pushing
- 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