Generate dummy Git repositories populated with the desired number of commits, branches, and structure.
Project description
git-dummy
Generate dummy Git repositories and populate them with the desired number of commits, branches, and structure.
Example: $ git-dummy --commits=5
This will initialize a new Git repo in the current directory with 5 commits on a single branch.
Use cases
- Programatically generate Git repos for functional testing of Git tools
- Mimic scenarios in real Git repos to practice on without touching real data
- Generate Git demo repos to teach or learn from
Features
- Run a one-liner git-dummy command in the terminal to generate a dummy Git repo based on your parameters
- Customize the repo name, path, number of commits, branches, and structure
Quickstart
- Install
git-dummy
:
$ pip install git-dummy
- Browse to the directory you want to create your dummy Git repo in:
$ cd path/to/dummy/parent
- Run the program:
$ git-dummy [options]
-
A new Git repo called
dummy
will be initialized and populated based on the supplied parameters. -
See global help for list of global options/flags and subcommands:
$ git-dummy -h
Requirements
- Python 3.7 or greater
- Pip (Package manager for Python)
Command options and flags
Available options and flags include:
--name
: The name of the dummy Git repo, defaults to "dummy".
--commits
: The number of commits to populate in the dummy Git repo, defaults to 5.
--git-dir
: The path at which to store the dummy Git repo, defaults to current directory.
Basic command examples
Generate a dummy Git repo called "cheese" with 10 commits on your Desktop:
$ git-dummy --name=cheese --commits=10 --git-dir=~/Desktop
For 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.
For example, the --git-dir
option can be set as an environment variable like:
$ export git_dummy_git_dir=~/Desktop
Similarly, the --name
option can be set like:
$ export git_dummy_name=cheese
In general:
$ export git_dummy_option_name=option_value
Explicitly specifying options at the command-line takes precedence over the corresponding environment variable values.
Learn More
Learn more about this tool on the git-dummy project page.
Authors
Jacob Stopak - on behalf of Initial Commit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for git_dummy-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6069ef8ea92cc1ef135bbdb645176337a324aa91237bfb2840f82d4d0c0f675b |
|
MD5 | 8378cbea0f750d9c9a74b119b6213615 |
|
BLAKE2b-256 | 5371f527bd6612b81921a7f8de59b1e4c13b646d143009757fa0a61327ade320 |