gitgym
An interactive CLI for learning git through hands-on exercises, inspired by Rustlings. No quizzes — you practice real git commands in real repositories inside a safe, sandboxed workspace.
Installation
pip install gitgym
Or with uv:
uv tool install gitgym
Requirements: Python 3.12+ and git. macOS and Linux only (Windows is not currently supported).
Quick Start
gitgym list # see all 32 exercises
gitgym next # set up the next exercise
cd ~/.gitgym/exercises/01_basics/01_init # cd into the printed path
# ... run git commands to solve the exercise ...
gitgym verify # check your work
Recommended Setup
Open two terminal windows (or tabs) side by side:
| Terminal 1 (work) | Terminal 2 (control) |
|---|---|
cd into the exercise directory |
gitgym describe — read the goal |
| Run git commands to solve the exercise | gitgym hint — get a hint |
| Edit files, stage, commit, branch, etc. | gitgym verify — check your work |
gitgym watch — live feedback |
This keeps your git work separate from the gitgym CLI, just like a real workflow.
Commands
| Command | Description |
|---|---|
gitgym list |
List all exercises grouped by topic with completion status |
gitgym start [exercise] |
Set up an exercise (defaults to next incomplete) |
gitgym next |
Alias for gitgym start with no argument |
gitgym describe |
Print the current exercise's description and goal |
gitgym verify |
Check if the current exercise's goal state is met |
gitgym watch |
Auto re-verify on changes (Ctrl+C to stop) |
gitgym hint |
Show the next progressive hint |
gitgym reset [exercise] |
Reset an exercise to its initial state |
gitgym reset --all |
Reset all exercises and clear progress |
gitgym progress |
Show overall progress summary |
gitgym clean |
Remove all gitgym data from your system |
Exercise names are shown in gitgym list (e.g. init, staging, amend). Use these names with gitgym start and gitgym reset.
Exercises
32 exercises across 9 topics, from beginner to advanced:
| Topic | Exercises |
|---|---|
| Basics | init, staging, status, first_commit, gitignore |
| Committing | amend, multi_commit, diff |
| Branching | create_branch, switch_branches, delete_branch |
| Merging | fast_forward, three_way_merge, merge_conflict |
| History | log_basics, log_graph, blame, show |
| Undoing Changes | restore_file, unstage, revert, reset_soft, reset_mixed |
| Rebase | basic_rebase, interactive_rebase, rebase_conflict |
| Stashing | stash_basics, stash_pop_apply |
| Advanced | cherry_pick, bisect, tags, aliases |
Features
Progressive hints — Each exercise has multiple hints revealed one at a time:
$ gitgym hint
Hint 1/3: Look at the `git init` command.
$ gitgym hint
Hint 2/3: Run `git init` inside the exercise directory.
Watch mode — gitgym watch polls the exercise directory and re-verifies automatically whenever you make changes. No need to switch terminals to run verify.
Progress tracking — Your progress is saved locally in ~/.gitgym/progress.json. Close your terminal and pick up where you left off. Run gitgym progress to see a per-topic breakdown.
Cleanup — When you're done, run gitgym clean to remove all exercise data from your system.
Platform Support
gitgym works on macOS and Linux. Windows is not currently supported because exercises use bash shell scripts. Windows users can use WSL as a workaround.
Contributing
Exercises follow a simple structure — each one is a directory with three files:
exercise.toml— metadata, description, goal, and hintssetup.sh— creates the initial repo stateverify.sh— checks if the goal is met (exit 0 = pass)
See the exercises/ directory for examples.
Metadata
Release files for gitgym 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| gitgym-0.1.0.tar.gz | 33.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gitgym-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 111.6 kB
Release files / gitgym-0.1.0.tar.gz
| Download URL | gitgym-0.1.0.tar.gz |
|---|---|
| Size | 33.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c77c96a5be0664137e7b230e985fc8f581102690b9aca9493162be16f2e84f39
|
|
BLAKE2b-256 checksum How to use checksums |
ab7ab1e5d015d921c4389b5c32eb10de7513a2971e869131532e65de3528f92f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.
Transparency logRelease files / gitgym-0.1.0-py3-none-any.whl
| Download URL | gitgym-0.1.0-py3-none-any.whl |
|---|---|
| Size | 78.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc2def9dcfe1c56dcbfd429ebfc92228cf1f664db2daeec09e7646f7e1e12e87
|
|
BLAKE2b-256 checksum How to use checksums |
1d1fda30da858f56421cdf2cdf332e6fa323cc1d1d42d66a1ddceff78f029392
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.
Transparency logSecurity for gitgym 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for gitgym-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.