You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will initialize a new Git repo in the current directory with 2 branches, each containing 10 commits.
13
13
14
-
Note: 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 a randomly chosen commit. The length of each branch is capped at the number of commits specified by `--commits`.
14
+
Note: 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`.
15
15
16
16
## Use cases
17
17
- Programatically generate Git repos for functional testing of Git tools
@@ -61,6 +61,7 @@ Available options and flags include:
61
61
`--name`: The name of the dummy Git repo, defaults to "dummy".
62
62
`--commits`: The number of commits to populate in the dummy Git repo, defaults to 5.
63
63
`--branches`: The number of branches to generate in the dummy Git repo, defaults to 1.
64
+
`--diverge-at`: The commit number at which branches diverge from `main`.
64
65
`--git-dir`: The path at which to store the dummy Git repo, defaults to current directory.
65
66
66
67
## Command examples
@@ -70,6 +71,12 @@ Generate a dummy Git repo called "cheese" on your Desktop, with 2 branches and 1
Generate a dummy repo with 4 branches `main`, `branch1`, `branch2`, and `branch3`. Branches diverge from `main` after the 2nd commit:
75
+
76
+
```console
77
+
$ git-dummy --branches=4 --diverge-at=2
78
+
```
79
+
73
80
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.
74
81
75
82
For example, the `--git-dir` option can be set as an environment variable like:
0 commit comments