Skip to main content

An interactive CLI platform for learning git, inspired by Rustlings.

Project description

gitgym

PyPI version Python CI

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 modegitgym 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 hints
  • setup.sh — creates the initial repo state
  • verify.sh — checks if the goal is met (exit 0 = pass)

See the exercises/ directory for examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitgym-0.1.0.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitgym-0.1.0-py3-none-any.whl (78.7 kB view details)

Uploaded Python 3

File details

Details for the file gitgym-0.1.0.tar.gz.

File metadata

  • Download URL: gitgym-0.1.0.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gitgym-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c77c96a5be0664137e7b230e985fc8f581102690b9aca9493162be16f2e84f39
MD5 0a7bb09a90230be8ec557b375a2f6b4b
BLAKE2b-256 ab7ab1e5d015d921c4389b5c32eb10de7513a2971e869131532e65de3528f92f

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitgym-0.1.0.tar.gz:

Publisher: publish.yml on enerrio/gitgym

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gitgym-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gitgym-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 78.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gitgym-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc2def9dcfe1c56dcbfd429ebfc92228cf1f664db2daeec09e7646f7e1e12e87
MD5 d61a8ca0730b6724d0ab6b965c7e354c
BLAKE2b-256 1d1fda30da858f56421cdf2cdf332e6fa323cc1d1d42d66a1ddceff78f029392

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitgym-0.1.0-py3-none-any.whl:

Publisher: publish.yml on enerrio/gitgym

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page