Configuration
Configuration is stored outside the project, under your OS config directory:
- Linux:
$XDG_CONFIG_HOME/git-sidecar, or~/.config/git-sidecarwhenXDG_CONFIG_HOMEis not set - macOS:
~/Library/Application Support/git-sidecar - Windows:
%APPDATA%\git-sidecar
git-sidecar identifies the current project from the nearest git repository’s remote.origin.url. The remote URL is normalized into a repo-shaped config path. For example, a parent repo with this origin:
git@github.com:andre-a-alves/git-sidecar.git
uses this config file on Linux when XDG_CONFIG_HOME is not set:
~/.config/git-sidecar/github.com/andre-a-alves/git-sidecar/config.toml
File format
The config file must use version 1:
version = 1
[sidecars.foobar]
repo = "git@github.com:example/foobar.git"
mapping = ".vendor/foobar/"
standalone = true # optional; omitted/false = unified (the default)
version— the config file version; currently only1is supportedsidecars.foobar— the nickname you use on the command linerepo— the remote URL for the sidecar repositorymapping— path to the directory containing the sidecar git repository, relative to the parent repo rootstandalone— optional; whentrue, the sidecar keeps its own.gitinside the mapping directory instead of the unified layout. Absent meansfalse, so config files written before this field existed keep working unchanged.
You can define as many [sidecars.<nickname>] entries as you need.
Tip: you don’t have to write this file by hand —
git sidecar clonecreates and extends it for you.
Because list, sync, clone, remove, rm, and help are subcommands, they are reserved and cannot be used as sidecar nicknames.