Skip to main content

A command line game to learn git

Project description

Git Gud

Demonstration

What is it?

Welcome to Git Gud, a command line game designed to help you learn how to use the popular version control system known as Git! As levels progress, you will know more and more about git, and eventually become a git grandmaster!

If something's missing feel free to add an issue, or if you're interested, view the contributors file and add something yourself! The project is intentionally structured to make it very easy to add new levels!

If you're more of a visual learner, you should start with "Learn Git Branching", and and then give Git Gud a try. Learn Git Branching is more visual, but with Git Gud, you're actually using git to complete the levels.

How do I use it?

For install instructions, see below.

Once Git Gud is installed, typing "git gud" will produce output and will start telling you what to do. Git Gud is meant to be like a game, and like a game, it has levels. The levels are divided up into skills, each of which will introduce you to a new topic in Git. It start off, assuming you have zero knowledge, and then builds up. For each level, it will give you a goal and will explain what's going on. Ideally, the game will teach you everything you need to know to beat it, but you're still encouraged to use other resources to learn as much as you want.

The beginning levels of the game start by getting you accustomed to the Git Gud interface, but later on, the training wheels come off, and you'll have to remember to type in the commands. If you ever forget which commands there are, or if you want to start on a later level, you can always run "git gud help" The most important commands are git gud goal, git gud status, git gud explain git gud test, and git gud load next. Other commands are also useful, but the output of those commands should be enough to guide you through the level.

To get started, you need to initialize Git Gud in an empty directory. Once Git Gud is initialized, it'll have full control over that directory, and it will start adding/removing commits and files. There will normally be multiple branches, and you'll be expected to use Git commands to solve each level. The levels range in difficulty, and require you to do different things. Some levels are really easy and only require you to read the explanation, but others just give you a situation and you'll need to use what you've learned to solve the level.

How to install

Git Gud is written in Python 3. You'll need to have Python >=3.6 installed in your system for Git Gud to work. I prefer using Anaconda to make sure everything works correctly, but you can also install with pip if you now what you're doing.

Once your environment is set up with Python >=3.6, installing is simple:

pip3 install git-gud

Getting started is also simple:

git gud

Git Gud will guide you through what to do

If either of those command don't work, there are various things you can try:

  • Use pip instead of pip3
  • Make sure your PATH variable includes Python executables
  • User install: pip3 install --user git-gud
  • Use Anaconda

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

git_gud-0.4.5.tar.gz (44.6 kB view details)

Uploaded Source

Built Distribution

git_gud-0.4.5-py3-none-any.whl (72.6 kB view details)

Uploaded Python 3

File details

Details for the file git_gud-0.4.5.tar.gz.

File metadata

  • Download URL: git_gud-0.4.5.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for git_gud-0.4.5.tar.gz
Algorithm Hash digest
SHA256 df59e09dc41e84809143f3598ee9a0bc8b0f8298537f719e367cf3bf338c836e
MD5 5bd9d0d4c322fa15692148aa2a4e0f3f
BLAKE2b-256 dc0f695dbdbf21d6e24abaa357cb8437b760156609ebdac44764db3984799697

See more details on using hashes here.

File details

Details for the file git_gud-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: git_gud-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 72.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for git_gud-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f329043e882eb0cb35312ea21f06d1001d5944c6e0f585a555ee862dd3edfa58
MD5 df12bc1301ff4671fc279351a030e104
BLAKE2b-256 e7cc4ef630089f30d92a70be599916950b368bfa79a4d29fa19db8447d60c838

See more details on using hashes here.

Supported by

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