Skip to content

Add another machine

  1. Install dotsync, and make sure git reaches your repository without any prompt:

    Terminal window
    git ls-remote git@github.com:you/dotfiles.git
  2. Connect the machine:

    Terminal window
    dotsync init git@github.com:you/dotfiles.git

    init clones the repository, installs every managed file, copies the binary to ~/.local/bin and starts the background agent. It’s safe to run again.

  3. Check the result:

    Terminal window
    dotsync doctor # git access, the agent, the last sync
    dotsync status # every managed file

A machine often has its own version of a managed file already: a distribution’s default .bashrc, or an old .gitconfig. You choose what happens to it:

This machine has… dotsync init <url> dotsync init --keep-existing <url>
no such file the shared version is installed the shared version is installed
an identical file it’s left as it is it’s left as it is
a different file it’s backed up, then replaced by the shared version it’s left untouched and reported as a conflict

The default gets a new machine consistent without asking you anything, and nothing is lost: every replaced file is in ~/.local/state/dotsync/backups/. Choose --keep-existing when the machine has changes you want to review file by file, then resolve each conflict.

A file that exists only on this machine, in a spot the manifest manages but the repository has nothing for yet, is sent to the repository.

  • Entries limited to another operating system, like "os": ["darwin"] on a Linux machine, are skipped automatically.
  • To skip an entry on this machine only, run dotsync exclude <entry> here.

See Per-OS and per-machine differences.

Flag Use it to
--keep-existing turn differing existing files into conflicts, as above
--branch <name> sync a branch other than main
--interval <seconds> sync more or less often than every 300 seconds
--no-agent skip the background agent, if you’ll run dotsync sync -q from your own scheduler
--no-install leave the binary where it is instead of copying it to ~/.local/bin

There’s nothing to undo on the others. On the old machine, uninstall dotsync, or just wipe it. Its commits stay in the repository’s history.