Git Sync
Git Sync connects Curlex to a Git repository on your computer. When you make changes to your collections or environments, Curlex can commit those changes to Git automatically — giving you a history of everything that changed and a way to back it up to any remote (GitHub, GitLab, Bitbucket, or your own server).
It is entirely optional. Curlex works completely without it.
What Gets Backed Up
When Git Sync runs, it writes the following files into a .curlex/ folder inside your repository:
.curlex/
├── manifest.json # Index of all files and when they were last updated
├── collections.json # All your API collections
├── environments.json # All your environments and their variables
├── tabs.json # Your currently open tabs
├── workspaces.json # Your workspace definitions
└── settings.json # Your app settings
Use a private repository if you push to a remote. Your collections may contain API base URLs, environment variable names, and other details you do not want publicly accessible.
Setting Up Git Sync
What You Need First
Before enabling Git Sync, you need:
- Git installed on your computer. You can check by opening a terminal and running
git --version. If it is not installed, download it from git-scm.com. - A local Git repository folder. This can be an existing repo or a new one you create with
git initin an empty folder. - Optionally, a remote repository (e.g. a private repo on GitHub) if you want to push your data offsite or sync across machines.
Configuring Git Sync in Curlex
- Open Settings (
Cmd/Ctrl ,) and navigate to the Git Sync tab. - Enable the Git Sync toggle.
- Fill in the settings:
| Setting | Description |
|---|---|
| Local Repository Path | The folder on your computer where your Git repository lives. Curlex will write the .curlex/ folder here. |
| Remote URL | Optional. The URL of a remote repository to push to — e.g. https://github.com/yourname/curlex-backup.git or an SSH URL. Leave blank to only keep a local history. |
| Branch | The branch to use (default: main). |
| Sync Interval | How often Curlex should automatically sync — options are On Change, Every 5 minutes, Every 10 minutes, or Every 30 minutes. |
| Git Binary Path | The path to the git executable on your system. Click Detect to find it automatically — Curlex will locate it from your PATH. You only need to set this manually if you installed Git in a non-standard location. |
- Click Detect next to the Git Binary Path field to verify Curlex can find Git.
That is it. Once the toggle is on and the repository path is set, Git Sync is active.
How Sync Works
Automatic Sync
Curlex syncs automatically based on your configured Sync Interval:
- On Change — every time you save a collection, environment, or workspace, Curlex commits the update to your local repository shortly afterward.
- Every 5 / 10 / 30 minutes — Curlex runs a sync on a timer, regardless of whether you made changes.
On each sync, Curlex:
- Exports your current data to the
.curlex/folder. - Stages and commits the changes locally with an automatic commit message.
- If a remote URL is configured, pushes the commit to the remote and pulls any incoming changes.
Manual Sync
A Git Sync indicator appears in the status bar at the bottom of the window. It shows when data was last synced. Click it to trigger a manual sync immediately — useful before switching machines or before closing the app after a long session.
Viewing Sync History
Because Curlex creates real Git commits, your full sync history is visible in any Git client (GitHub Desktop, Sourcetree, VS Code, or the command line). Each commit corresponds to one sync operation, so you can see exactly what changed and when.
Using a Remote Repository (GitHub, GitLab, etc.)
To push your data to a remote:
Option 1 — HTTPS with a Personal Access Token
Paste the HTTPS URL into the Remote URL field:
https://github.com/yourname/curlex-backup.git
Git will prompt for credentials the first time it pushes. Use your username and a Personal Access Token (not your GitHub password) as the password. Git will remember the credentials using your system's credential manager.
To create a Personal Access Token on GitHub:
- Go to GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic).
- Click Generate new token (classic).
- Give it a name (e.g.
Curlex sync). - Select the
reposcope. - Click Generate token and copy it — you will only see it once.
Option 2 — SSH
If you have an SSH key set up with your Git provider, use the SSH URL:
git@github.com:yourname/curlex-backup.git
SSH authentication is handled by your system's SSH agent — no further configuration needed in Curlex.
Creating a Private Repository on GitHub
- Go to github.com and click + → New repository.
- Give it a name (e.g.
curlex-backup). - Set it to Private.
- Click Create repository.
- Copy the URL and paste it into Curlex's Remote URL field.
Syncing Across Multiple Machines
To keep two or more computers in sync:
- Create the remote repository on GitHub (or another provider) as described above.
- On the first machine, configure Git Sync with the remote URL and let it do an initial push.
- On each additional machine:
- Create a local folder and run
git clone <remote-url>in it, or just create an empty folder and rungit initfollowed bygit remote add origin <remote-url>. - Point Curlex's Local Repository Path to that folder and enter the same remote URL.
- Enable Git Sync.
- Create a local folder and run
Curlex will pull the latest data from the remote on the first sync and import it. From that point on, any changes you make on one machine will be pushed to the remote and pulled on the other.
Important: if you edit collections on two machines without syncing in between, the sync uses a last-write-wins approach — the most recently synced data is kept. To avoid losing changes, sync before switching machines.
Troubleshooting
Git Sync Does Not Start
- Check that the Local Repository Path exists and is a valid Git repository (it should contain a
.gitfolder). - Click Detect in the Git Binary Path field to confirm Curlex can find Git on your system.
- If Git is installed but not detected, enter the full path to the
gitexecutable manually (e.g./usr/bin/giton macOS/Linux orC:\Program Files\Git\bin\git.exeon Windows).
Push to Remote Fails
- Verify your remote URL is correct.
- If using HTTPS, check that your credentials are saved and valid in your system's credential manager.
- If using SSH, make sure your SSH key is added to your Git provider.
- Check your network connection.
Sync Creates Conflicts
Git may report conflicts if the same file was modified on two machines without a pull in between. Open a terminal, navigate to your local repository folder, and resolve the conflict using standard Git commands (git pull, git merge, git rebase). Once the conflict is resolved, the next sync in Curlex will continue normally.
I Accidentally Committed Sensitive Data
If you pushed secrets or credentials to a remote repository, treat them as compromised immediately:
- Revoke and regenerate the exposed credentials with the relevant service.
- Use git-filter-repo or GitHub's secret scanning guidance to remove the history from your repository.
- Mark any variables containing credentials as Secret in your Curlex environments, and consider storing them in the Vault instead.
Frequently Asked Questions
Do I need a GitHub account to use Git Sync? No. Git Sync works with any local Git repository, no remote required. A remote is only needed if you want to back up offsite or sync across machines.
Can I use GitLab, Bitbucket, or a self-hosted Git server? Yes — any Git remote that your local Git client can push to will work. Just paste the appropriate HTTPS or SSH URL into the Remote URL field.
Can different machines use different branches? Yes — each machine can be configured with its own branch name in Settings.
Will Git Sync commit my environment variable values, including secrets?
Git Sync writes your environments to environments.json, but secret-typed variables and common credential fields are scrubbed (replaced with {{env.SECRET_REDACTED}}) before they are written. Always use a private repository anyway, and consider storing highly sensitive credentials in the Vault instead of environment variables, since Vault secrets are never written to Git.
How do I turn off Git Sync? Disable the Git Sync toggle in Settings → Git Sync. Your local repository and its history are not affected — only future automatic syncs stop.
How do I see what has been committed?
Open your local repository in any Git client, or run git log in a terminal from the repository folder. Each sync creates a commit with a timestamp-based message.