Git Sync
Git Sync allows you to version control your achievements using Git. This enables synchronization across devices, version history, and integration with platforms like GitHub, GitLab, or Bitbucket.
Why Use Git Sync?
- Version History - See how achievements evolved over time
- Cross-Device Sync - Keep achievements in sync between computers
- Backup - Your data is stored in a Git repository
- Restore - Roll back to any previous version
- Collaboration - Share repository with others (if desired)
Setting Up Git Sync
Prerequisites
- A Git repository (GitHub, GitLab, Bitbucket, or self-hosted)
- Repository URL (HTTPS or SSH)
- Authentication credentials (token or SSH key)
Step 1: Create a Repository
Create a new private repository on your preferred platform:
GitHub:
- Go to github.com/new
- Name it something like
herojournal-data - Make it Private
- Don’t initialize with README
GitLab:
- Go to gitlab.com/projects/new
- Name your project
- Set visibility to Private
Step 2: Configure in HeroJournal
- Go to Settings > Git tab
- Enable Git sync with the toggle
- Enter your repository URL
- Choose authentication method:
- HTTPS with token (recommended)
- SSH (requires SSH key setup)
Step 3: Authenticate
For HTTPS (recommended):
- Create a personal access token on your Git platform
- Enter the token in HeroJournal
- Click Connect
For SSH:
- Ensure your SSH key is set up with your Git platform
- Use the SSH URL format:
git@github.com:username/repo.git - Click Connect
Step 4: Initial Sync
- Click Sync Now to perform initial synchronization
- Your achievements are now backed up to Git
Using Git Sync
Auto-Commit
When enabled, HeroJournal automatically commits changes:
- Every save creates a commit
- Commit messages describe the change
- No manual action required
Manual Sync
You can also sync manually:
- Push - Send local changes to remote
- Pull - Get changes from remote
- Sync - Both push and pull
Viewing Status
The Git panel shows:
- Current branch
- Number of commits ahead/behind
- Last sync time
- Any uncommitted changes
Syncing Across Devices
Setting Up a Second Device
- Install HeroJournal on the new device
- Go to Settings > Git
- Enter the same repository URL
- Authenticate with your credentials
- Click Pull to download your achievements
Handling Conflicts
If you edit on multiple devices before syncing:
- HeroJournal detects the conflict
- You’ll be prompted to choose:
- Keep local version
- Keep remote version
- Merge manually
Sync frequently to minimize conflicts. Enable auto-sync for best results.
Restoring Previous Versions
Viewing History
- Open Git settings
- Click View History
- Browse previous commits
Restoring a Version
- Find the commit you want to restore
- Click Restore
- Confirm the action
- Your achievements are restored to that point
Restoring creates a new commit with the old data. Your current achievements will be replaced.
Security Considerations
Repository Privacy
- Always use private repositories
- Your achievements contain professional information
- Don’t share repository access unnecessarily
Authentication
- Use personal access tokens with minimal scope
- Rotate tokens periodically
- Don’t commit tokens to other repositories
Data Sensitivity
Consider what you include in achievements:
- Avoid including passwords or secrets
- Be mindful of confidential project information
- Remember that Git history is permanent
Troubleshooting
“Authentication failed”
- Check your token/credentials are correct
- Verify the token has appropriate permissions
- For GitHub: ensure token has
reposcope
“Repository not found”
- Verify the repository URL is correct
- Check you have access to the repository
- Ensure the repository exists
“Merge conflict”
- Pull latest changes first
- Review conflicting files
- Choose which version to keep
- Commit the resolution
“Push rejected”
- Someone else pushed changes
- Pull first, then push
- Resolve any conflicts
Best Practices
- Sync regularly - Enable auto-sync or sync daily
- Use private repos - Protect your professional information
- Review before push - Check what you’re committing
- Keep tokens secure - Don’t share or expose access tokens
- Clean history periodically - Remove sensitive data if accidentally committed
Last updated on