Tell the story of your Git project by creating video animations (.mp4) of your commit history directly from your Git repo.
Project description
git-story
Tell the story of your Git project by creating video animations (.mp4) of your commit history directly from your Git repo.
Use cases
- Visualizing Git projects
- Sharing desired parts of your workflow with your team
- Creating animated Git videos for blog posts or YouTube
- Helping newer developers learn Git
Features
- Run a single command in the terminal to generate a custom Git animation (.mp4) from your repo
- Specify any commit id or ref to start animating from (default:
HEAD
) - Specify the number of commits to include (default:
8
) - Ref labels are drawn by default for
HEAD
, branch names, and tags - Simple branching structures (1 or 2 branches)
- Add custom branded intro/outro sequences if desired
Video animation example
Requirements
- Python 3.9 or greater
- Pip (Package manager for Python)
- Manim (Community version)
- GitPython
Quickstart
-
Install GitPython
$ pip3 install gitpython
- Install
git-story
:
$ pip3 install git-story
- Browse to the Git repository you want create an animation from:
$ cd path/to/project/root
- Run the program:
$ git-story
-
A default animation
.mp4
file will be created using the most recent 8 commits on your checked-out Git branch. -
Use command-line options for customization, see usage:
$ git-story -h
usage: git-story [-h] [--commits COMMITS] [--commit-id COMMIT_ID] [--hide-merged-chains] [--reverse] [--title TITLE] [--logo LOGO] [--outro-top-text OUTRO_TOP_TEXT]
[--outro-bottom-text OUTRO_BOTTOM_TEXT] [--no-intro] [--no-outro] [--max-branches-per-commit MAX_BRANCHES_PER_COMMIT] [--max-tags-per-commit MAX_TAGS_PER_COMMIT]
optional arguments:
-h, --help show this help message and exit
--commits COMMITS The number of commits to display in the Git animation (default: 8)
--commit-id COMMIT_ID
The ref (branch/tag), or first 6 characters of the commit to animate backwards from (default: HEAD)
--hide-merged-chains Hide commits from merged branches, i.e. only display mainline commits (default: False)
--reverse Display commits in reverse order in the Git animation (default: False)
--title TITLE Custom title to display at the beginning of the animation (default: Git Story, by initialcommit.com)
--logo LOGO The path to a custom logo to use in the animation intro/outro (default: logo.png)
--outro-top-text OUTRO_TOP_TEXT
Custom text to display above the logo during the outro (default: Thanks for using Initial Commit!)
--outro-bottom-text OUTRO_BOTTOM_TEXT
Custom text to display below the logo during the outro (default: Learn more at initialcommit.com)
--no-intro Omit the intro sequence from the animation (default: False)
--no-outro Omit the outro sequence from the animation (default: False)
--max-branches-per-commit MAX_BRANCHES_PER_COMMIT
Maximum number of branch labels to display for each commit (default: 2)
--max-tags-per-commit MAX_TAGS_PER_COMMIT
Maximum number of tags to display for each commit (default: 1)
Command Examples
Default - draw 8 commits starting from HEAD
, from oldest to newest:
$ cd path/to/project/root
$ git-story
Customize the start commit and number of commits, and reverse their display order:
$ cd path/to/project/root
$ git-story --commit-id a1b2c3 --commits=6 --reverse
Add an intro with custom title and logo:
$ cd path/to/project/root
$ git-story --commit-id dev --commits=10 --show-intro --title "My Git Repo" --logo path/to/logo.png
Add an outro with custom text and logo:
$ cd path/to/project/root
$ git-story --show-outro --outro-top-text "My Git Repo" --outro-bottom-text "Thanks for watching!" --logo path/to/logo.png
Installation
See QuickStart section for details on installing manim and GitPython dependencies. Then run:
$ pip3 install git-story
Learn More
Learn more about this tool on the git-story 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_story-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab2db90ce4f71e27956d401dd5cdba877c6b84873d10c17fc3b5117bf75e15dc |
|
MD5 | 7d7114e829d7ddae5e140b02f67070e9 |
|
BLAKE2b-256 | 8145689e5954275b21a4cb33463eb2d443cd91749dbad236634c501f51a84c58 |