{"id":20138236,"url":"https://github.com/kukuster/git-copy-branch","last_synced_at":"2026-05-08T20:33:27.376Z","repository":{"id":118966037,"uuid":"285879716","full_name":"Kukuster/git-copy-branch","owner":"Kukuster","description":"Recreates all commits (only the main chain) from a given repository \u0026 branch to a new repository \u0026 branch, excluding certain files as per configuration.","archived":false,"fork":false,"pushed_at":"2020-10-15T13:58:39.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-30T22:51:01.967Z","etag":null,"topics":["git"],"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/Kukuster.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":"2020-08-07T16:56:43.000Z","updated_at":"2021-02-04T15:00:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"3355aa56-7fa4-4af4-8769-a257e043f7ea","html_url":"https://github.com/Kukuster/git-copy-branch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kukuster/git-copy-branch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kukuster%2Fgit-copy-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kukuster%2Fgit-copy-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kukuster%2Fgit-copy-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kukuster%2Fgit-copy-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kukuster","download_url":"https://codeload.github.com/Kukuster/git-copy-branch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kukuster%2Fgit-copy-branch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32795951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["git"],"created_at":"2024-11-13T21:36:52.017Z","updated_at":"2026-05-08T20:33:27.349Z","avatar_url":"https://github.com/Kukuster.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Short Description\nI. creates 2 dirs in the current dir:\n  - `dirread`\n  - `dicreate`\n\n II. fetches the repo in the `dirread`\n \n III. creates a new repo in the `dircreate`\n \nIV. Loops through the commits in the specified branch in `dirread`, starting from the oldest commit; and for each commit it copies everything from `dirread` to `dircreate` except the specified `Exceptions`, and makes a commit in `dircreate` with the message name of the one in `dirread`.\n**Thus effectively creates a new repository and copies all commits of a branch but excludes certain files and dirs completely from the tracking history.**\n\n## Dependencies\n - git\n - rsync\n \n## Details\nMerges are not preserved, only the main 1-d part of the branch is copied, navigating through the first parents starting from the latest commit in the branch.\n\n\u003cbr\u003e`dirread` and `dircreate` names, `Exceptions`, repository url, and branch name are to be specified in `config.sh` file.\n\n\u003cbr\u003eAlso, as for `Exceptions`, higher-level paths work as well. E.g. putting `\"core/notes.txt\"` will only omit that file, preserving everything else in the `\"core\"` directory\n\n\u003cbr\u003eA considerable chunk of the script is checks: if you have `git` and `rsync` installed, if there's a `config.sh` file in the current dir, if the specified remote repository exists and readable, etc. So that the script is unlikely to make some mess if something went wrong unintentionally.\n\n\u003cbr\u003e**This script doesn't push or affect your remote repository in any way. The only effect of this script is local, within the directory where the script is executed.\n\u003cbr\u003eYou can configure `config.sh` file, execute the script with `bash`, and check if the newly created repo works for you.\n\u003cbr\u003eOutput of all key executed git commands is preserved.**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkukuster%2Fgit-copy-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkukuster%2Fgit-copy-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkukuster%2Fgit-copy-branch/lists"}