Skip to content

Commit 806a21c

Browse files
Add git-dummy dependency, entry point, and readme instructions
Signed-off-by: Jacob Stopak <[email protected]>
1 parent d28616b commit 806a21c

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ Example: `$ git-sim merge <branch>`
2222
- Save visualizations as a part of your team documentation to document workflow and prevent recurring issues
2323
- Create static Git diagrams (jpg) or dynamic animated videos (mp4) to speed up content creation
2424
- Help visual learners understand how Git commands work
25+
- Combine with bundled command [git-dummy](https://github.com/initialcommit-com/git-dummy) to generate a dummy Git repo and then simulate operations on it
2526

2627
## Features
2728
- Run a one-liner git-sim command in the terminal to generate a custom Git command visualization (.jpg) from your repo
2829
- Supported commands: `log`, `status`, `add`, `restore`, `commit`, `stash`, `branch`, `tag`, `reset`, `revert`, `merge`, `rebase`, `cherry-pick`
2930
- Generate an animated video (.mp4) instead of a static image using the `--animate` flag (note: significant performance slowdown, it is recommended to use `--low-quality` to speed up testing and remove when ready to generate presentation-quality video)
3031
- Choose between dark mode (default) and light mode
3132
- Specify output formats of either jpg, png, mp4, or webm
33+
- Combine with bundled command [git-dummy](https://github.com/initialcommit-com/git-dummy) to generate a dummy Git repo and then simulate operations on it
3234
- Animation only: Add custom branded intro/outro sequences if desired
3335
- Animation only: Speed up or slow down animation speed as desired
3436

@@ -61,6 +63,20 @@ $ cd path/to/git/repo
6163
$ git-sim [global options] <subcommand> [subcommand options]
6264
```
6365

66+
Optional: If you don't have an existing Git repo to simulate commands on, use the bundled [git-dummy](https://github.com/initialcommit-com/git-dummy) command to generate a dummy Git repo with the desired number of branches and commits to simulate operations on with git-sim:
67+
68+
```console
69+
$ git-dummy --name="dummy-repo" --branches=3 --commits=10
70+
$ cd dummy-repo
71+
$ git-sim [global options] <subcommand> [subcommand options]
72+
```
73+
74+
Or if you want to do it all in a single command:
75+
76+
```console
77+
$ git-dummy --no-subdir --branches=3 --commits=10 && git-sim [global options] <subcommand> [subcommand options]
78+
```
79+
6480
5) Simulated output will be created as a `.jpg` file. Output files are named using the subcommand executed combined with a timestamp, and by default are stored in a subdirectory called `git-sim_media/`. The location of this subdirectory is customizable using the command line flag `--media-dir=path/to/output`. Note that when the `--animate` global flag is used, render times will be much longer and a `.mp4` video output file will be produced.
6581

6682
6) For convenience, environment variables can be set for any global command-line option available in git-sim. All environment variables start with `git_sim_` followed by the name of the option.

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"opencv-python-headless",
2626
"typer",
2727
"pydantic",
28+
"git-dummy",
2829
],
2930
keywords="git sim simulation simulate git-simulate git-simulation git-sim manim animation gitanimation image video dryrun dry-run",
3031
project_urls={
@@ -34,6 +35,7 @@
3435
entry_points={
3536
"console_scripts": [
3637
"git-sim=git_sim.__main__:app",
38+
"git-dummy=git_dummy.__main__:app",
3739
],
3840
},
3941
include_package_data=True,

0 commit comments

Comments
 (0)