Skip to main content

Overview

Special commands are unique to Learn Git Branching and provide functionality for navigating levels, getting help, and controlling the learning environment. These commands don’t correspond to real Git operations.

Level Navigation

level

Regex: /^level\s?([a-zA-Z0-9]*)/ Description: Load a specific level by name or open level selector Examples:
level                         # Open level selection dialog
level intro1                  # Load level "intro1"
level rampup2                 # Load level "rampup2"

levels

Regex: /^levels($|\s)/ Description: Show all available levels Examples:
levels                        # Display all level sequences

sandbox

Regex: /^sandbox($|\s)/ Description: Enter sandbox mode (free practice without level objectives) Examples:
sandbox                       # Enter sandbox mode

exit level

Regex: /^exit level($|\s)/ Description: Exit the current level and return to level selection Examples:
exit level                    # Exit current level

Level Help

show goal

Regex: /^(show goal|goal|help goal)$/ Description: Display the current level’s goal visualization Examples:
show goal                     # Show goal tree
goal                          # Short form
help goal                     # Alternative form

hide goal

Regex: /^hide goal$/ Description: Hide the goal visualization Examples:
hide goal                     # Hide goal tree

show solution

Regex: /^show solution($|\s)/ Description: Display and optionally execute the level solution Examples:
show solution                 # Show solution dialog
Using the solution may mark the level as “solved” but won’t count as completing it with your own approach.

objective

Regex: /^(objective|assignment)$/ Description: Show the level objective and description Examples:
objective                     # Display level objective
assignment                    # Alternative form

help level

Regex: /^help level$/ Description: Show help specific to the current level Examples:
help level                    # Display level help

start dialog

Regex: /^start dialog$/ Description: Replay the level’s introductory dialog Examples:
start dialog                  # Show intro dialog again

Reset and Undo

undo

Regex: /^undo($|\s)/ Description: Undo the last command Examples:
undo                          # Undo last command
You can undo multiple times to step back through your command history.

reset

Regex: /^reset( +--forSolution)?$/ Description: Reset the level to its starting state Examples:
reset                         # Reset to level start
reset --forSolution           # Reset for solution (internal)

reset solved

Regex: /^reset solved($|\s)/ Description: Reset your solved status for all levels Examples:
reset solved                  # Clear all solved progress

Level Building

build level

Regex: /^build +level\s?([a-zA-Z0-9]*)( +--skipIntro)?$/ Description: Enter level builder mode to create custom levels Examples:
build level                   # Start building a new level
build level --skipIntro       # Skip intro dialog
build level myLevel           # Edit level "myLevel"

export tree

Regex: /^export +tree$/ Description: Export the current tree state as JSON Examples:
export tree                   # Copy tree JSON to clipboard

import tree

Regex: /^import +tree$/ Description: Import a tree from JSON Examples:
import tree                   # Prompt for tree JSON

export level

Regex: /^export +level$/ (mentioned in code patterns) Description: Export a custom level definition

import level

Regex: /^import +level$/ Description: Import a custom level definition Examples:
import level                  # Prompt for level JSON

importTreeNow

Regex: /^importTreeNow($|\s)/ Description: Internal command to import tree immediately (used after import tree dialog)

importLevelNow

Regex: /^importLevelNow($|\s)/ Description: Internal command to import level immediately (used after import level dialog)

General Help

help

Regex: /^help( +general)?$|^\?$/ Description: Show general help information Examples:
help                          # Show help
help general                  # Show general help
?                             # Short form

git help

Regex: /^(git help($|\s)|git$)/ Description: Show Git command help with links to documentation Examples:
git help                      # Show Git help
git                           # Show Git help (no command)

show

Regex: /^show$/ Description: Show available show commands Examples:
show                          # List show commands
Outputs:
show commands
show solution
show goal

show commands

Regex: /^show +commands$/ Description: Display all available commands with options and descriptions Examples:
show commands                 # List all commands
This command displays commands with documentation links for Git commands.

Display and Visualization

flip

Regex: /^flip$/ Description: Flip the tree visualization vertically (reverse commit arrow direction) Examples:
flip                          # Toggle tree orientation

refresh

Regex: /^refresh$/ Description: Refresh the tree visualization Examples:
refresh                       # Redraw tree

Localization

locale

Regex: /^locale +(\w+)$/ and /^(locale|locale reset)$/ Description: Change or reset the interface language Examples:
locale en_US                  # Switch to English
locale zh_CN                  # Switch to Chinese
locale es_AR                  # Switch to Spanish
locale reset                  # Reset to default locale
locale                        # Reset to default locale

disableLevelInstructions

Regex: /^disableLevelInstructions$/ Description: Disable level instruction dialogs Examples:
disableLevelInstructions      # Skip level intros

Sharing

Regex: /^share( +permalink)?$/ Description: Generate a shareable permalink for the current state Examples:
share                         # Generate share link
share permalink               # Generate share link

Utility

clear

Regex: /^clear($|\s)/ Description: Clear the command output terminal Examples:
clear                         # Clear terminal

delay

Regex: /^delay (\d+)$/ Description: Set animation delay in milliseconds Examples:
delay 0                       # Instant animations
delay 1000                    # 1 second delay
delay 500                     # 0.5 second delay

echo

Regex: /^echo "(.*?)"$|^echo (.*?)$/ Description: Echo a string to the terminal output Examples:
echo "Hello World"            # Output with quotes
echo Hello                    # Output without quotes

rollup

Regex: /^rollup (\d+)$/ Description: Combine the last N commands into a single command Examples:
rollup 3                      # Combine last 3 commands

alias

Regex: /^alias (\w+)="(.+)"$/ Description: Create a custom command alias Examples:
alias gca="git commit --amend"  # Create alias
alias gcm="git commit -m"       # Commit shortcut

unalias

Regex: /^unalias (\w+)$/ Description: Remove a custom alias Examples:
unalias gca                   # Remove alias

Unix-Style Commands

ls

Regex: /^ls( |$)/ Description: Displays message about file system (not functional) Examples:
ls                            # Not functional, shows message

cd

Regex: /^cd( |$)/ Description: Displays message about directories (not functional) Examples:
cd                            # Not functional, shows message
ls and cd are not functional as Learn Git Branching doesn’t simulate a file system.

Mobile

mobile alert

Regex: /^mobile alert($|\s)/ Description: Internal command for mobile compatibility alerts

Command Chaining

You can chain multiple commands with semicolons:
git checkout -b feature; git commit; git commit
level intro1; show goal
reset; git commit; git branch feature

Golf Mode Commands

Commands that do not count toward golf scoring:
  • show solution
  • show goal
  • objective
  • help level
  • start dialog
  • All information/display commands (show commands, help, etc.)
  • undo (doesn’t undo the move count)

Internal Commands

Some commands are used internally by the application:
  • importTreeNow - Used after import tree dialog
  • importLevelNow - Used after import level dialog
  • reset --forSolution - Used when showing solutions
  • rollup - Used by command history UI
  • mobile alert - Mobile compatibility checks

See Also

Git Commands

Standard Git command reference

Overview

Command system overview

Build docs developers (and LLMs) love