{"id":26800539,"url":"https://github.com/ktsu-dev/syncfilecontents","last_synced_at":"2026-07-01T01:00:47.777Z","repository":{"id":244000361,"uuid":"813977192","full_name":"ktsu-dev/SyncFileContents","owner":"ktsu-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-23T23:24:24.000Z","size":738,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-24T01:16:55.656Z","etag":null,"topics":["cli","csharp","dotnet","duplicate-files","file-synchronization","git-integration","multi-directory","sha256","sync-file-contents"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/ktsu-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT.md","agents":null,"dco":null,"cla":null}},"created_at":"2024-06-12T05:33:37.000Z","updated_at":"2026-06-23T23:24:28.000Z","dependencies_parsed_at":"2026-02-16T05:05:14.300Z","dependency_job_id":null,"html_url":"https://github.com/ktsu-dev/SyncFileContents","commit_stats":null,"previous_names":["ktsu-io/syncfilecontents","ktsu-dev/syncfilecontents"],"tags_count":164,"template":false,"template_full_name":null,"purl":"pkg:github/ktsu-dev/SyncFileContents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FSyncFileContents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FSyncFileContents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FSyncFileContents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FSyncFileContents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktsu-dev","download_url":"https://codeload.github.com/ktsu-dev/SyncFileContents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktsu-dev%2FSyncFileContents/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34988714,"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-30T02:00:05.919Z","response_time":92,"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":["cli","csharp","dotnet","duplicate-files","file-synchronization","git-integration","multi-directory","sha256","sync-file-contents"],"created_at":"2025-03-29T20:17:47.126Z","updated_at":"2026-07-01T01:00:47.730Z","avatar_url":"https://github.com/ktsu-dev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SyncFileContents\n\n![GitHub branch status](https://img.shields.io/github/checks-status/ktsu-dev/SyncFileContents/main)\n\n`SyncFileContents` is a .NET 9 console application that scans a directory for files with a specified name, compares their contents using SHA256 hashes, and allows the user to synchronize these files across the directory. It also provides Git integration for committing and pushing changes.\n\n## Features\n\n- Recursively scan a specified directory for files with a given name\n- Support for multiple filenames (comma-separated) and wildcard patterns\n- Compare file contents using SHA256 hashes\n- Display file paths grouped by hash with the oldest modification time for each hash group\n- Sort hash groups by modification time (most recent first)\n- Synchronize file contents across different directories within the scanned path\n- Automatically skip files in nested Git repositories (submodules)\n- Commit changes to Git repositories with automatic staging\n- Fetch, merge, and push changes to remote repositories\n- Interactive prompts with persistent history for paths and filenames\n- Persistent Git credentials storage\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Command-Line Arguments](#command-line-arguments)\n  - [Example Usage](#example-usage)\n  - [Workflow](#workflow)\n  - [Git Credentials](#git-credentials)\n- [Development](#development)\n- [License](#license)\n\n## Installation\n\nTo use `SyncFileContents`, you need to have [.NET 9 SDK](https://dotnet.microsoft.com/download) installed on your machine.\n\nClone the repository:\n\n```sh\ngit clone https://github.com/ktsu-dev/SyncFileContents.git\n```\n\nNavigate to the project directory:\n\n```sh\ncd SyncFileContents\n```\n\nBuild the project:\n\n```sh\ndotnet build\n```\n\n## Usage\n\nRun the application with optional command-line arguments:\n\n```sh\ndotnet run -- [path] [filename]\n```\n\n### Command-Line Arguments\n\n- `path`: The path to recursively scan in. If not provided, you will be prompted to enter it interactively.\n- `filename`: The filename to scan for. If not provided, you will be prompted to enter it interactively. Supports wildcards and comma-separated values.\n\n### Example Usage\n\nTo scan the current directory for files named `example.txt` and synchronize their contents:\n\n```sh\ndotnet run -- . example.txt\n```\n\nTo scan a specific directory for multiple config files:\n\n```sh\ndotnet run -- /path/to/projects \"config.json,settings.json\"\n```\n\nTo run interactively without arguments:\n\n```sh\ndotnet run\n```\n\n### Workflow\n\n1. **Scan**: The application recursively scans the specified directory for files matching the filename pattern\n2. **Compare**: Files are grouped by SHA256 hash to identify differing versions\n3. **Display**: Shows each unique hash with the oldest modification time for that hash group and associated file paths, sorted by modification time (most recent first)\n4. **Select**: If there are exactly two hash groups, the most recent is suggested first, then the older one if declined; otherwise, you enter the hash to use as the sync source\n5. **Preview**: A dry-run shows which files will be updated\n6. **Sync**: After confirmation, files are copied from the source to all destinations\n7. **Commit**: Outstanding changes in Git repositories can be committed\n8. **Push**: Repositories with only SyncFileContents commits can be automatically pushed\n\n### Git Credentials\n\nOn first run, you'll be prompted to enter your Git username and personal access token. These credentials are stored locally and used for push operations.\n\n## Development\n\n### Prerequisites\n\n- [.NET 9 SDK](https://dotnet.microsoft.com/download)\n\n### Building the Project\n\nClone the repository and navigate to the project directory:\n\n```sh\ngit clone https://github.com/ktsu-dev/SyncFileContents.git\ncd SyncFileContents\n```\n\nBuild the project:\n\n```sh\ndotnet build\n```\n\n### Running Tests\n\nTo run the tests, use the following command:\n\n```sh\ndotnet test\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktsu-dev%2Fsyncfilecontents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktsu-dev%2Fsyncfilecontents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktsu-dev%2Fsyncfilecontents/lists"}