Navigation

GitHub Synchronization

Connect local workspaces to a GitHub repository and synchronize them manually.

Last updated:

Datalensia allows you to link your local workspaces to a GitHub repository for persistent storage and team collaboration. This feature uses a Global Repository Model, meaning you configure your repository once and then map individual workspaces to specific file paths within that repo.

Key Features

  • Global Configuration: Set your GitHub Owner, Repository, and Branch once at the application level.
  • Branch Selection: Support for switching between different branches of your repository.
  • Searchable Repository Picker: Easily find your repositories through an integrated search interface.
  • Manual Push/Pull: Complete control over when data is sent to or retrieved from GitHub.
  • SHA-based Conflict Detection: Datalensia identifies if a file has diverged (changed both locally and remotely) and prevents accidental data loss.
  • Batch Operations: A Global Sync Dashboard allows you to synchronize multiple workspaces simultaneously with a single commit message.

Getting Started

  1. Generate a Token: Create a GitHub Personal Access Token (PAT) with the repo scope.
  2. Configure Global Settings: Open the Workspace Manager → GitHub tab and click Set up GitHub (or Repository settings). The GitHub settings dialog contains your token and shared repository.
  3. Link a Workspace:
    • In the Workspaces tab, open a workspace's ⋮ → Link to GitHub menu. Set its Target File Path (e.g., workspaces/my-project.json) in Workspace GitHub settings.
    • Use Push to GitHub to create the remote file.

The GitHub tab contains the Global Sync Dashboard. Link Selected assigns GitHub paths to selected unlinked workspaces locally; it does not upload files. In a mixed selection, Link applies only to unlinked workspaces and Push only to linked workspaces that need pushing.

Replacing a missing or expired token keeps your existing workspace links and sync history.

Managing Conflicts

Datalensia uses an optimistic locking strategy based on GitHub's internal SHAs.

  • Push Pending: Local changes are newer than the last sync.
  • Pull Pending: Remote changes are newer than your local version.
  • Conflict: Both local and remote have changed since the last sync.
  • Remote Deleted: The workspace was previously synced, but the file has been deleted from GitHub.
  • Branch Mismatch: The workspace was last synced with a different branch than the currently selected global branch.

When a conflict occurs, you have several options for resolution:

  • Pull & Overwrite Local: Accept the remote changes and discard local modifications.
  • Save Remote as Copy: Download the remote version as a new workspace while keeping your local workspace unchanged.
  • Force Push: Overwrite the remote version with your local changes.

In Global Sync, choose Resolve conflict on the affected workspace to open these same options.

For individual push and pull, use a workspace's ⋮ → GitHub settings menu. For its read-only commit list, choose ⋮ → Version history. The GitHub settings dialog also links to the Linked to GitHub library filter.

Privacy and Security

Your GitHub Personal Access Tokens are stored exclusively in your browser's local storage. Datalensia's servers never see or store your tokens or repository data. All communication happens directly between your browser and the GitHub API.