{"id":25763888,"url":"https://github.com/bernankez/git-sync","last_synced_at":"2026-06-10T04:31:27.287Z","repository":{"id":217927082,"uuid":"745129687","full_name":"Bernankez/git-sync","owner":"Bernankez","description":"Auto sync repos when pushing to git","archived":false,"fork":false,"pushed_at":"2024-07-11T09:15:41.000Z","size":262,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-23T19:58:27.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Bernankez.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-18T17:44:04.000Z","updated_at":"2024-07-11T09:15:44.000Z","dependencies_parsed_at":"2024-01-26T03:24:40.309Z","dependency_job_id":"842ae786-ddfb-4595-98c2-dd80813ee231","html_url":"https://github.com/Bernankez/git-sync","commit_stats":null,"previous_names":["bernankez/git-sync"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Bernankez/git-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bernankez%2Fgit-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bernankez%2Fgit-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bernankez%2Fgit-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bernankez%2Fgit-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bernankez","download_url":"https://codeload.github.com/Bernankez/git-sync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bernankez%2Fgit-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34137570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-02-26T20:19:32.874Z","updated_at":"2026-06-10T04:31:27.271Z","avatar_url":"https://github.com/Bernankez.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-sync\n\n[![npm](https://img.shields.io/npm/v/@bernankez/git-sync?color=red\u0026label=npm)](https://www.npmjs.com/package/@bernankez/git-sync)\n[![CI](https://github.com/Bernankez/git-sync/workflows/CI/badge.svg)](https://github.com/Bernankez/git-sync/actions)\n[![LICENSE](https://shields.io/github/license/Bernankez/git-sync)](https://github.com/Bernankez/git-sync/blob/master/LICENSE)\n\nAuto sync repos when pushing to git.\n\n## Install\n\n`git-sync` should be installed in your project instead of globally.\n\n```sh\n$ npm i -D @bernankez/git-sync\n```\n\n## Usage\n\n1. Create a config file named `gitsync.config.ts` or `gitsync.config.js` in the root of your project. For example\n\ngitsync.config.ts\n```ts\nimport { defineConfig } from \"@bernankez/git-sync\";\n\nexport default defineConfig({\n  remoteName: \"origin\",\n  url: [\"git@github.com:Bernankez/git-sync.git\", \"git@github.com:Bernankez/example.git\"]\n});\n```\n\n2. Run the CLI to update git config\n\n```sh\n$ npx git-sync\n```\n\n3. You can also add the CLI to your `package.json`, so it can automatically run after `npm install`\n\n```json\n{\n  \"scripts\": {\n    \"prepare\": \"git-sync\"\n  }\n}\n```\n\n\u003e [!NOTE]\n\u003e If you accidentally set the wrong git url and it has been added to your git, please go to the `[project root dir]/.git` and remove the line `url = [your incorrect git url]` in the `config` file.\n\n## Configuration\n\n### CLI\n\n#### --config \\\u003cpath\\\u003e\n\nSpecific where you want to read the config file from.\n\n#### --git \\\u003cpath\\\u003e\n\nSpecific git base dir.\n\n### Configuration file\n\n#### remoteName\n\nRemote name, defaults to origin.\n\n#### fetch\n\nIf remoteName is not added, fetch will be used as the parameter when adding remote.\n\n#### url\n\nGit urls that you want to push to.\n\n#### gitBaseDir\n\nSame as `--git` in CLI. `--git` has higher priority than `gitBaseDir`.\n\n## What's behind\n\n```sh\ngit init\ngit remote add \u003cconfig.remoteName\u003e \u003cconfig.fetch\u003e\ngit remote set-url --add \u003cconfig.remoteName\u003e \u003cconfig.url\u003e\ngit remote -v\n```\n\n## License\n\n[MIT](LICENSE) License © [科科Cole](https://github.com/Bernankez)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernankez%2Fgit-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbernankez%2Fgit-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernankez%2Fgit-sync/lists"}