{"id":20799845,"url":"https://github.com/xnacly/x-git-sync","last_synced_at":"2026-01-22T15:21:12.095Z","repository":{"id":65389357,"uuid":"579158627","full_name":"xNaCly/x-git-sync","owner":"xNaCly","description":"Backup your repository at configured intervals using git","archived":false,"fork":false,"pushed_at":"2023-01-28T18:45:42.000Z","size":51,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T04:03:18.541Z","etag":null,"topics":["git","go","sync"],"latest_commit_sha":null,"homepage":"https://xnacly.me/posts/2023/x-git-sync/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xNaCly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-16T20:13:10.000Z","updated_at":"2024-10-11T17:03:27.000Z","dependencies_parsed_at":"2023-02-12T21:31:34.690Z","dependency_job_id":null,"html_url":"https://github.com/xNaCly/x-git-sync","commit_stats":null,"previous_names":["xnacly/git-auto-sync"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xNaCly%2Fx-git-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xNaCly%2Fx-git-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xNaCly%2Fx-git-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xNaCly%2Fx-git-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xNaCly","download_url":"https://codeload.github.com/xNaCly/x-git-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252785109,"owners_count":21803824,"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":["git","go","sync"],"created_at":"2024-11-17T18:10:26.164Z","updated_at":"2026-01-22T15:21:12.047Z","avatar_url":"https://github.com/xNaCly.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# x-git-sync\n\nBackup your repository at configured intervals\n\nhttps://user-images.githubusercontent.com/47723417/213995030-a72ab64f-3e64-403e-bda7-57279b37780d.mp4\n\n## Why use xgs\n\n- highly configurable\n- 0 external dependencies (except git)\n- backup with the help of git, every interval\n- inspired by [obsidian-git](https://github.com/denolehov/obsidian-git) and its automatic backup system\n- alternative to obsidian git that does not require obsidian and is faster\n- sane defaults\n- JSON based configuration\n\n### Why use this project and not something else\n\nXGS is a lot more minimal and configurable than [git-auto-sync](https://github.com/GitJournal/git-auto-sync),\ndoesn't require obsidian or VScode to work ([Obsidian Git](https://github.com/denolehov/obsidian-git), [VS Code GitDoc](https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gitdoc)) and\nisn't as complicated or unintelligible as [Git Annex](https://git-annex.branchable.com/) or [Git Sync](https://github.com/simonthum/git-sync).\n\nAlternatives:\n\n- [git-auto-sync](https://github.com/GitJournal/git-auto-sync)\n- [Obsidian Git](https://github.com/denolehov/obsidian-git)\n- [VS Code GitDoc](https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gitdoc)\n- [Git Annex](https://git-annex.branchable.com/)\n- [Git Sync](https://github.com/simonthum/git-sync)\n\n## How to use xgs\n\n### Installing xgs\n\n#### From Source\n\n\u003e Requires:\n\u003e\n\u003e - go\n\n```bash\ngit clone https://github.com/xnacly/x-git-sync xgs\ncd xgs\ngo build\n```\n\n```\n./xgs # unix\nxgs.exe # windows\n```\n\n#### From release (unix)\n\n- download executable from latest release\n- move the `xgs`-executable to a directory in the path, for linux: `mv ./xgs /usr/bin` (this might require elevated privileges)\n\n### Running xgs\n\nPrerequisites:\n\n- git needs to be installed, xgs will panic if it isn't\n\n  1.  projects needs to be a git repository with a remote set up\n  2.  git user needs be authenticated to the remote\n  3.  you should be able to run the following commands in your project without issues before using xgs in it:\n\n  - `git add -A`\n  - `git commit -m \"test\"`\n  - `git push`\n\n  4.  you can now use xgs in your project\n\n1. Navigate to the git project you want to backup\n2. run `xgs` in your terminal\n\n\u003e If you have no `xgs.json`, xgs will use its default configuration.\n\n### Config path\n\n- On Unix systems, `$XDG_CONFIG_HOME/xgs.json` or `$HOME/.config/xgs.json`\n- On Darwin, `$HOME/Library/Application Support/xgs.json`\n- On Windows, `%AppData%/xgs.json`\n- On Plan 9, `$home/lib/xgs.json`\n\n### Config options and defaults\n\nIf xgs can't find its config file (`xgs.json`) it will fallback to its default config:\n\n```jsonc\n{\n  // specifies the date format which the date will be formatted as\n  //\n  //  - 2006 for the year, 06 would only be the last two integer\n  //  - 01 for the month\n  //  - 02 for the day\n  //  - 15 for the hour (24-hour format), 05 for 12-hour format\n  //  - 04 for the minute\n  //  - 05 for the second\n  //\n  // time formatting in go is weird, see docs:\n  //\n  // https://www.digitalocean.com/community/tutorials/how-to-use-dates-and-times-in-go\n  \"commit_date\": \"2006-01-02 15:04:05\",\n\n  // specifies the format of the commit, currently supports:\n  // - commit_date: %date%\n  \"commit_format\": \"backup: %date%\",\n\n  // List filenames affected by the commit in the commit body\n  // together with the type of change which happend to the file:\n  //\n  //      Affected Files:\n  //      \u003cfilename\u003e \u003cchange\u003e\n  //\n  // possible change types:\n  //  - modified\n  //  - added\n  //  - renamed\n  //  - deleted\n  //  - copied\n  //  - updated but unmerged\n  \"add_affected_files\": true,\n\n  // time interval between backups (in s)\n  \"backup_interval\": 300,\n\n  // commit command, which xgs runs after running `git add -A`\n  \"commit_cmd\": \"git commit -m\",\n\n  // enables debug mode (verbose logging, extra infos, etc.), default: false\n  \"debug\": false,\n\n  // enables pulling the latest changes from remote on start, default: true\n  \"pull_on_start\": true\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxnacly%2Fx-git-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxnacly%2Fx-git-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxnacly%2Fx-git-sync/lists"}