โ Note: This project is no longer actively maintained.
I originally built it as a Git simulation lab to deepen my understanding of Git internals.It was part of my self-learning journey, and while it may not be perfect it helped me learn a lot through trial, error, and iteration.
๐ I'm currently working on a new active project focused on DevOps failure simulations: FailOps Lab
GitBug is an CLI that teaches Git through hands-on bug fixing. Experience a realistic merge conflict scenario with visual feedback at every step - the first of many Git challenges to come! It helps you learn by doing, not just reading.
"Finally understand merge conflicts through practical experience!" - Early Tester
- ๐ Merge Conflict Scenario: A full guided simulation of a real-world Git merge conflict with step-by-step objectives
- ๐ Visual Git Internals: Track the working directory, staging area, and commit history visually
- ๐ Bug Tracker: Simulate software bugs with role-based reporting, assigning, and tracking
- ๐ก Command Insights: Use
explain <command>to understand how Git works - ๐ฅ Auto Team Setup (in Scenarios): Simulated teammates automatically push conflicting changes during scenario setups (not user-driven)
- ๐ Remote Repo Simulation: Used only in scenario-based bugs for merge/rebase cases; normal bugs run in simple local-only Git repos
- ๐ Error Diagnosis: Get helpful feedback and suggestions when you run into mistakes
- ๐ Graph Before/After View: Visualize Git state transitions before and after critical commands like
merge,reset, andrebase - ๐น Command Hooks: Contribute new explanations or behaviors for Git commands
| Scenario Start | Git State Visualization | Graph Transitions |
|---|---|---|
![]() | ![]() | ![]() |
git clone https://github.com/dvig14/gitbug.git cd gitbug๐ก For best visuals, install
rich(Recommended):pip install rich
python cli.py add # Report a new bug python cli.py assign # Assign a bug python cli.py list # View bugs python cli.py simulate # Start Git simulationFollow the in-terminal prompts to solve the scenario.
graph TD A[Create Branch] --> B[Implement Fix] B --> C[Merge Changes] C --> D[Resolve Conflict] Youโll:
- Create a feature branch
- Fix a bug in
login.css - Simulated a teammate conflict
- Resolve and commit
See Git's internal state evolve in real-time - unique to GitBug!
Initial State:
๐ Git State Visualization โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ Working Directory ๐ฅ Staging Area ๐ Commit History โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โข login.css (modified) โข (empty) โ๏ธ a1b2c: Initial commit โข (no other changes) โ๏ธ d4e5f: Add header โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโAfter git add login.css:
๐ Git State Visualization โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ Working Directory ๐ฅ Staging Area ๐ Commit History โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โข (no changes) โข login.css โ๏ธ a1b2c: Initial commit โ๏ธ d4e5f: Add header โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโcli.py # Main entry point CONTRIBUTING.md # How to contribute README.md # Overview gifs/ # scenario start, state, graph gitbugsim/ โโโ bug_simulator/ # Bug tracker (add, assign, list) โโโ data/ # JSON data: bugs, scenarios, users โโโ explanations/ # Markdown help for commands โโโ git_simulation/ # Git simulator + visualizer + hooks โโโ scenarios/ # Scenario engine, remote engine & logic โโโ utils/ # Common helpers - Merge Conflict Scenario
- Bug Tracker System
- Role-based CLI (reporter, developer, manager)
- Visual Git State
- Detached HEAD recovery
- Reset vs Revert
- Stashing changes
- Rebase workflow (interactive, squash)
- Pull request simulations
- Teammate reviews
- Remote push/pull scenarios
Weโre looking for:
- Scenario creators (e.g.,
rebase,stash,reset,revert) - Contributors to
explain <command>logic,add more git errors - Developers who can enhance visuals
- Writers to document usage, command flow, and help messages
See CONTRIBUTING.md to get started!
GitBug is licensed under the MIT License - free to use, learn, and extend.
- rich โ for beautiful CLI rendering
- All contributors โ join the mission to make Git learning fun and real!
Join us in building the future of Git education!


