{"id":13863059,"url":"https://github.com/dotphiles/dotsync","last_synced_at":"2025-07-14T13:33:15.985Z","repository":{"id":3669222,"uuid":"4738267","full_name":"dotphiles/dotsync","owner":"dotphiles","description":"Sync dotfiles between multiple machines from a git repo or push using rsync","archived":false,"fork":false,"pushed_at":"2023-11-04T21:44:58.000Z","size":105,"stargazers_count":324,"open_issues_count":6,"forks_count":66,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-08-05T06:06:38.237Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotphiles.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2012-06-21T11:24:45.000Z","updated_at":"2024-07-23T13:50:48.000Z","dependencies_parsed_at":"2024-04-13T18:04:32.056Z","dependency_job_id":null,"html_url":"https://github.com/dotphiles/dotsync","commit_stats":{"total_commits":123,"total_committers":7,"mean_commits":"17.571428571428573","dds":0.08130081300813008,"last_synced_commit":"f3b67fe45e2bf1d2ea96c654b70bc42a2da50f5e"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotphiles%2Fdotsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotphiles%2Fdotsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotphiles%2Fdotsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotphiles%2Fdotsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotphiles","download_url":"https://codeload.github.com/dotphiles/dotsync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225980898,"owners_count":17554919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T06:02:01.007Z","updated_at":"2024-11-22T23:30:40.251Z","avatar_url":"https://github.com/dotphiles.png","language":"Shell","readme":"dotsync\n=======\n\ndotsync keeps your local dotfiles in sync with a git repository and keeps\nmultiple remote machines in sync, either with them pulling from the git\nrepo or pushed via rsync\n\nMaster servers can be assigned, for cases where groups of machines are\nbehind firewalls or only accessible from a certain location.\n\nRequirements\n------------\n\ndotsync assumes that you have ssh setup correctly, with ssh-agent and configs\nfor correct usernames etc, if you can't 'ssh hostname' it probably wont work\nand if your asked for passwords it will take hours with any number of machines.\n\nInstallation\n------------\n\nIf you already have your dotfiles in a git repo...\n\n    cd ~/.dotfiles\n    git submodule add git@github.com:dotphiles/dotsync.git\n    git submodule update --init\n\nIf you dont...\n\nFork the main project on [github](https://github.com/dotphiles/dotphiles)\n\n    git clone --recursive git@github.com:*username*/dotphiles.git ~/.dotfiles\n\nCopy your dotfiles into ~/.dotfiles without the dot...\n\nList your dotfiles in dotsyncrc without the dot...\n\nCheckin your changes...\n\n    git commit -a -m \"Initial Commit\"\n    git push\n\nThen, symlink your dotfiles into place...\n\n    ~/.dotfiles/dotsync/bin/dotsync -L\n\nSee the *Configuration* section for configuration info.\n\nThen add hosts into dotsyncrc and `dotsync -I -H hostname` (at your own risk!)\n\nUsage\n-----\n\n    -I          - Initialise a machine using dotsync\n    -L          - Symlink available dotfiles into $HOME\n    -u          - Update to the latest copy of dotfiles\n    -U          - Update to the latest copy of dotfiles inc submodules\n    -P          - Push any local changes back to the repo (git only)\n    -H host     - Perform action against host listed in config, can be 'ALL'\n    -a          - Updates dotfiles on all known machines\n    -A          - Updates dotfiles and submodules on all known machines\n    -r          - Use rsync instead of git\n    -f conf     - Config file, defaults to '~/.dotsyncrc' or '$DOTSYNCRC'\n    -d dotfiles - Location of dotfiles, defaults to '~/.dotfiles'\n    -l          - List configured hosts and dotfiles to symlink\n    -c          - Run an arbitrary shell command on all known machines\n    -g          - Same as -c, but only on git configured machines\n    -v          - Verbose\n    -h          - Show help message\n\nConfiguration\n-------------\n\n### ~/.dotsyncrc\n\nThis config determines which hosts to sync, how, where from and which\ndotfiles to symlink into your homedir.\n\nThis file can be included in the repo, and dotsync will use it if its not\nalready symlinked.\n\nSee [templates/dotsyncrc][6]\n\n### ~/.dotfiles/.gitignore\n\nControls which files are ignored from being added to the git repo, add any\ntemporary and 'secret' files here.\n\nSee [templates/gitignore][7]\n\n### ~/dotfiles/.rsyncignore\n\nControls which files are ignored when rsyncing a remote host, add any temporary\nand 'secret' files here.\n\nSee [templates/rsyncignore][8]\n\nCustom Dotfiles\n---------------\n\nSometimes its handy to link a specific file on a specific machine, or to have a\nlocal dotfile in place instead.\n\nIf you have the following in dotsyncrc\n\n    [files]\n    dotfile\n    [endfiles]\n\ndotsync will look for\n\n    ~/$DOTFILES/dotfile.d/localhost\n    ~/$DOTFILES/dotfile.d/$HOSTNAME\n    ~/$DOTFILES/dotfile.d/$DOMAIN\n\nAnd link the first one it finds instead of the standard dotfile.  The `localhost`\ndotfile should be excuded from your repo.\n\nMachine specific Dotfiles\n-------------------------\n\nSometimes you have a dotfile thats only for one machine and not symlinked on any\nothers.\n\nIf you add the following to dotsyncrc\n\n    [hosts]\n    hostname.example.com        git=ANY             file=dotfile1/dotfile1,dotfile2:.linkto\n    [endhosts]\n\ndotsync will link the following on `hostname` only\n\n    ~/$DOTFILES/dotfile1/dotfile1 to ~/.dotfile1\n    ~/$DOTFILES/dotfile1 to ~/.linkto\n\nRemote Machines\n---------------\n\n**WARNING! This is the least tested and resilient code, i use it to sync a few\nhundred machines without problem but you can easily wipe out your ssh keys on\nremote machines if anything goes wrong....be prepared**\n\ndotsync is based around the idea of having lots of remote machines, that you want\nto sync your dotfiles to.\n\ne.g.\n\n             *origin*\n          ----github------   remoteservers:r\n        /         |        \\      |\n    desktop:g----laptop:g----workdesktop:g\n                    |             |\n                mac-mini:r   workservers:r\n\nand the following dotsyncrc\n\n    [hosts]\n    laptop                       git=NONE\n    desktop                      git=laptop\n    mac-mini                     rsync=laptop\n    workdesktop                  git=laptop\n    workserver1                  rsync=workdesktop\n    workserver2                  rsync=workdesktop\n    workserver3                  rsync=workdesktop\n    remoteserver1                rsync=workdesktop\n    remoteserver1                rsync=workdesktop\n    remoteserver3                rsync=workdesktop\n    [endhosts]\n\nRuning a `dotsync -A` on *laptop* would\n\n  - git pull from github\n  - connect to *workdesktop* \u0026 *desktop* \u0026 git pull dotfiles from github\n  - rsync dotfiles to mac-mini\n\nRuning a `dotsync -A` on *workdesktop* would\n\n  - git pull from github\n  - rsync dotfiles to *workserver{1,2,3}* \u0026 *remoteserver{1,2,3}*\n\nThese can all be done with `dotsync -A -H ALL` which when run on *laptop*, **should**\n\n  - git pull from github\n  - connect to *workdesktop* \u0026 *desktop* \u0026 git pull dotfiles from github\n  - rsync dotfiles to mac-mini\n  - ssh to *workdesktop* \u0026 rsync dotfiles to *workserver{1,2,3}* \u0026 *remoteserver{1,2,3}*\n\nBackups\n-------\n\nExisting dotfiles will be backed up in `~/.backup/dotfiles/`\nExisting dotfile repos will be backed up as `~/.backup/dotfiles.old/`\n\nLicense\n-------\n\nCopyright (c) 2012 [dotsync contributers][9]\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[1]: https://github.com/dotphiles/dotsync/contributors\n[2]: https://github.com/dotphiles/dotsync/issues\n[3]: http://gun.io/blog/how-to-github-fork-branch-and-pull-request\n[4]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html\n[5]: https://help.github.com/articles/using-pull-requests\n[6]: https://github.com/dotphiles/dotsync/blob/master/templates/dotsyncrc\n[7]: https://github.com/dotphiles/dotsync/blob/master/templates/gitignore\n[8]: https://github.com/dotphiles/dotsync/blob/master/templates/rsyncignore\n[9]: https://github.com/dotphiles/dotsync/graphs/contributors\n\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotphiles%2Fdotsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotphiles%2Fdotsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotphiles%2Fdotsync/lists"}