{"id":18898480,"url":"https://github.com/initialcommit-com/git-dummy","last_synced_at":"2025-04-15T02:32:15.320Z","repository":{"id":65837605,"uuid":"601056076","full_name":"initialcommit-com/git-dummy","owner":"initialcommit-com","description":"Generate dummy Git repositories populated with the desired number of commits, branches, and structure.","archived":false,"fork":false,"pushed_at":"2023-09-15T22:41:40.000Z","size":65,"stargazers_count":27,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T14:21:18.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/initialcommit-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2023-02-13T09:19:43.000Z","updated_at":"2025-03-13T16:03:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"76a3cca1-2833-4669-a5c8-0a40313692c8","html_url":"https://github.com/initialcommit-com/git-dummy","commit_stats":{"total_commits":25,"total_committers":2,"mean_commits":12.5,"dds":0.24,"last_synced_commit":"3c8d4809830272ddf826fbc275fb407331c51f11"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initialcommit-com%2Fgit-dummy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initialcommit-com%2Fgit-dummy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initialcommit-com%2Fgit-dummy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initialcommit-com%2Fgit-dummy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/initialcommit-com","download_url":"https://codeload.github.com/initialcommit-com/git-dummy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248994032,"owners_count":21195302,"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":"2024-11-08T08:42:50.689Z","updated_at":"2025-04-15T02:32:15.132Z","avatar_url":"https://github.com/initialcommit-com.png","language":"Python","readme":"# git-dummy\n[![GitHub license](https://img.shields.io/github/license/initialcommit-com/git-dummy)](https://github.com/initialcommit-com/git-dummy/blob/main/LICENSE)\n[![GitHub tag](https://img.shields.io/github/v/release/initialcommit-com/git-dummy)](https://img.shields.io/github/v/release/initialcommit-com/git-dummy)\n[![Downloads](https://static.pepy.tech/badge/git-dummy)](https://pepy.tech/project/git-dummy)\n[![Contributors](https://img.shields.io/github/contributors/initialcommit-com/git-dummy)](https://github.com/initialcommit-com/git-dummy/graphs/contributors)\n[![Share](https://img.shields.io/twitter/url?label=Share\u0026url=https%3A%2F%2Ftwitter.com%2Finitcommit)](https://twitter.com/intent/tweet?text=Check%20out%20git%2Ddummy%20%2D%20a%20tool%20to%20generate%20dummy%20Git%20repos%20populated%20with%20the%20desired%20number%20of%20commits,%20branches,%20and%20structure,%20by%20%40initcommit!%20https%3A%2F%2Fgithub%2Ecom%2Finitialcommit%2Dcom%2Fgit%2Ddummy)\n\nGenerate dummy Git repositories and populate them with the desired number of commits, branches, merges, and structure.\n\nExample: `$ git-dummy --commits=10 --branches=4 --merge=1`\n\nThis will initialize a new Git repo in the current directory with 4 branches, each containing 10 commits, 1 of which is merged back into `main`.\n\nNote: All generated dummy repos have at minimum 1 branch called `main`. For dummies with multiple branches, branches are named `branch1, branch2, ..., branchN`. Each branch currently branches off of `main` at `--diverge-at` if supplied, or else a randomly chosen commit. The length of each branch is capped at the number of commits specified by `--commits`. Use `--merge=x,y,...,n` to select which branches get merged back into `main`. \n\n## Use cases\n- Programatically generate Git repos for functional testing of Git tools\n- Decide how many commits and branches are generated\n- Select which branches get merged back into `main`\n- Mimic scenarios in real Git repos to practice on without touching real data\n- Generate Git demo repos to teach or learn from\n\n## Features\n- Run a one-liner git-dummy command in the terminal to generate a dummy Git repo based on your parameters\n- Customize the repo name, path, number of commits, branches, merges, and structure\n\n## Quickstart\n\n1) Install `git-dummy`:\n\n```console\n$ pip install git-dummy\n```\n\n2) Browse to the directory you want to create your dummy Git repo in:\n\n```console\n$ cd path/to/dummy/parent\n```\n\n3) Run the program:\n\n```console\n$ git-dummy [options]\n```\n\n4) A new Git repo called `dummy` will be initialized and populated based on the supplied parameters.\n\n5) See global help for list of global options/flags and subcommands:\n\n```console\n$ git-dummy -h\n```\n\n## Requirements\n* Python 3.7 or greater\n* Pip (Package manager for Python)\n\n## Command options and flags\nAvailable options and flags include:\n\n`--name`: The name of the dummy Git repo, defaults to \"dummy\".  \n`--commits`: The number of commits to populate in the dummy Git repo, defaults to 5.  \n`--branches`: The number of branches to generate in the dummy Git repo, defaults to 1.  \n`--diverge-at`: The commit number at which branches diverge from `main`.  \n`--merge`: A comma separated list of branch postfix ids to merge back into `main`.  \n`--git-dir`: The path at which to store the dummy Git repo, defaults to current directory.  \n`--no-subdir`: Initialize the dummy Git repo in the current directory instead of in a subdirectory.  \n`--constant_sha`: Use constant values for commit author, email, and commit date parameters to yield consistent sha1 values across git-dummy runs.  \n`--allow-nested`: Allow dummy repo creation within an existing Git repo, as long as it's not at the level of an existing .git/ folder.\n\n## Command examples\nGenerate a dummy Git repo called \"cheese\" on your Desktop, with 2 branches and 10 commits on each branch:\n\n```console\n$ git-dummy --name=cheese --branches=2 --commits=10 --git-dir=~/Desktop\n```\n\nGenerate a dummy repo with 4 branches `main`, `branch1`, `branch2`, and `branch3`. Branches diverge from `main` after the 2nd commit:\n\n```console\n$ git-dummy --branches=4 --diverge-at=2\n```\n\nGenerate a dummy repo with 4 branches, so that `branch1` and `branch3` are merged back into `main`:\n\n```console\n$ git-dummy --branches=4 --merge=1,3\n```\n\nFor convenience, environment variables can be set for any command-line option available in git-dummy. All environment variables start with `git_dummy_` followed by the name of the option.\n\nFor example, the `--git-dir` option can be set as an environment variable like:\n\n```console\n$ export git_dummy_git_dir=~/Desktop\n```\n\nSimilarly, the `--name` option can be set like:\n\n```console\n$ export git_dummy_name=cheese\n```\n\nIn general:\n\n```console\n$ export git_dummy_option_name=option_value\n```\n\nExplicitly specifying options at the command-line takes precedence over the corresponding environment variable values.\n\n## Learn More\nLearn more about this tool on the [git-dummy project page](https://initialcommit.com/tools/git-dummy).\n\n## Authors\n**Jacob Stopak** - on behalf of [Initial Commit](https://initialcommit.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitialcommit-com%2Fgit-dummy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finitialcommit-com%2Fgit-dummy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitialcommit-com%2Fgit-dummy/lists"}