GitTutor is an open source interactive CLI for practicing Git through hands-on exercises, executed in isolated environments using Docker.
Enable junior developers to learn and master Git through realistic and guided scenarios: init, commit, merge, rebase, conflicts, stash, etc.
Each exercise is isolated in a Docker container, to avoid any interference with your local environment.
- 🔄 In comming
Git-Tutor/
├── docs/
│ └──LIBRARY.md # Library resume
├── src/
│ ├── main.ts # Entrée principale de la CLI
│ └── menu.ts # Main menu to select exercice
├── exercises/
│ └── init-commit/
│ ├── setup.ts # Prépare l’environnement de l’exercice
│ ├── validate.ts # Valide les actions de l’utilisateur
│ └── meta.json # Métadonnées de l’exercice
├── package.json
├── tsconfig.json
└── README.md
- Start the CLI:
git-tutor-
Choose an exercise from the interactive menu
-
The CLI:
- creates a workspace
workspaces/<exo> - launches an isolated Docker container with Git
- runs
setup.tsin this container to initialize the repository
- creates a workspace
-
The user enters the container to complete the exercise:
docker exec -it git-tutor-<exo> sh-
Once finished, they run validation via the CLI
-
validate.tsautomatically checks the state of the repository
Each exercise is run in a Docker container:
- Local volume mounted in
/workspace/<exo> - Custom image with Git + Node.js + CLI
- Disposable, controlled, and reproducible environment
docker run -dit \
--name git-tutor-init-commit \
-v $(pwd)/workspace/init-commit:/workspace \
git-tutor-imagepnpm install
pnpm build
pnpm link --globalpnpm build
# or
makeThis project is under the MIT license.
Contributions are welcome! Propose an exercise, improve the validation system, or add an advanced mode. Fork, PR, review: everything is appreciated.