{"id":29407068,"url":"https://github.com/princecodes247/repo-sync","last_synced_at":"2025-07-11T00:40:32.174Z","repository":{"id":283781696,"uuid":"874798134","full_name":"princecodes247/repo-sync","owner":"princecodes247","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-22T05:41:23.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T06:26:04.699Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/princecodes247.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2024-10-18T13:33:35.000Z","updated_at":"2025-03-22T05:41:26.000Z","dependencies_parsed_at":"2025-03-22T06:37:18.823Z","dependency_job_id":null,"html_url":"https://github.com/princecodes247/repo-sync","commit_stats":null,"previous_names":["princecodes247/repo-sync"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/princecodes247/repo-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princecodes247%2Frepo-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princecodes247%2Frepo-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princecodes247%2Frepo-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princecodes247%2Frepo-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/princecodes247","download_url":"https://codeload.github.com/princecodes247/repo-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princecodes247%2Frepo-sync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264697567,"owners_count":23650955,"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":"2025-07-11T00:40:31.451Z","updated_at":"2025-07-11T00:40:32.113Z","avatar_url":"https://github.com/princecodes247.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Repo Sync\n\nA command-line tool to synchronize changes between two Git repositories, specifically designed for maintaining a controlled production repository that receives updates from a development repository.\n\n## Overview\n\nRepo Sync helps manage scenarios where you have:\n- A development repository where multiple contributors can push changes\n- A production repository where access is restricted to specific maintainers\n\nThe tool automatically handles:\n- Cloning the development repository\n- Copying new and modified files to the production repository\n- Maintaining commit history\n- Cleaning up temporary files\n- Excluding specific files/directories (like .git, node_modules, etc.)\n\n## Installation\n\n```bash\nnpm install\n```\n\n## Usage\n\n### Basic Command\n\n```bash\nreposync push \u003csource-repo\u003e \u003ctarget-repo\u003e\n ```\n Parameters:\n- source-repo : Path or URL to the development repository\n- target-repo : Path to the production repository Examples:\nUsing local paths:\n\n```bash\nreposync push ./dev-repo ./prod-repo\n ```\n\nUsing remote repository:\n\n```bash\nreposync push https://github.com/user/dev-repo ./prod-repo\n ```\n```\n\n### Options\n\n```bash\nreposync push --verbose \u003csource-repo\u003e \u003ctarget-repo\u003e\n ```\n\n- --verbose : Display additional information during execution\n\n## How It Works\n\n1. Initialization\n   - Creates a temporary directory for cloning\n   - Sets up Git configuration\n\n2. Development Repository Clone\n   - Clones the development repository to a temporary location\n   - Retrieves the latest commit message\n\n3. File Synchronization\n   - Copies new files from development to production\n   - Updates modified files\n   - Removes files that no longer exist in development\n   - Preserves Git history\n\n4. Production Repository Update\n   - Initializes Git repository if needed\n   - Commits changes with the original commit message\n   - Cleans up temporary files\n\n## Excluded Files/Directories\n\nThe following are automatically excluded from synchronization:\n- .git directory\n- .gitignore file\n- node_modules directory\n- .next directory\n\n## Error Handling\n\nThe tool includes error handling for common scenarios:\n- Existing temporary directories\n- Repository access issues\n- File system operations\n\n## Requirements\n- Node.js\n- Git\n- fs-extra package\n- simple-git package\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincecodes247%2Frepo-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprincecodes247%2Frepo-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincecodes247%2Frepo-sync/lists"}