Ways to Contribute
Contributions typically fall into a few categories:Translations
Add or improve language translations for the application and levels
Bug Fixes
Fix issues, improve browser compatibility, or resolve layout problems
New Features
Add new git commands, improve visualization, or enhance the UI
New Levels
Create educational challenges to teach git concepts
Documentation
Improve code comments, README, or architectural docs
Testing
Add test coverage or improve test infrastructure
General Workflow
Follow this standard git workflow when contributing:Install dependencies
Create a feature branch
Create a new branch for your changes:Use a descriptive branch name that reflects what you’re working on.
Make your changes
Run tests and linting
Before committing, ensure all tests pass:Fix any test failures or linting errors.
Contribution Types
Translations
We welcome all translation improvements or additions! How translations work:- Levels are stored in giant JSON blobs, keyed by locale for each string
- The format can be somewhat awkward to edit manually
- Translations are in
src/js/intl/strings.js
- Open
src/js/intl/strings.js - Find the English strings and add corresponding entries for your locale
- Test your translation by running the app with your locale
- Submit a pull request with your changes
Include screenshots showing your translation in context to help reviewers verify accuracy.
Bug Fixes
For general bugs:- Describe the issue and steps to reproduce
- Make your fix
- Test thoroughly
- Submit a pull request with:
- Description of the bug
- Your fix approach
- How you verified the fix
- Attach before and after screenshots
- Test across multiple browsers if possible
- For browser-specific issues, use targeted CSS rules by browser
- Prefer minimal, surgical fixes over broad changes
New Features
Adding new functionality to the git engine or UI:Discuss first (optional)
For large features, consider opening an issue first to discuss the approach. This can save time if the maintainers have specific preferences.
Implement your feature
Make your changes in the appropriate files:
- Git commands:
src/js/git/commands.js - Command parsing:
src/js/commands/index.js - GitEngine core:
src/js/git/index.js - UI components:
src/js/react_views/orsrc/js/views/
Add tests
If adding new functionality to the git engine, add tests in Tests should cover:
__tests__/:- Normal operation
- Edge cases
- Error conditions
Creating New Levels
You can create educational levels using the built-in level builder:Launch the level builder
In the application, run:A dialog will walk you through:
- Setting up the starting commit tree
- Writing the goal description
- Defining the target state
- Adding hints (optional)
Test your level
Play through your level to ensure:
- Instructions are clear
- The goal is achievable
- The solution validation works correctly
- Difficulty is appropriate for the sequence
Pull Request Guidelines
What to include
What to include
- Clear description of what your PR does
- Why the change is needed
- Any relevant issue numbers
- Screenshots for UI changes
- Test results (if applicable)
Code style
Code style
- Follow the existing code style
- Run JSHint to catch common issues:
gulp jshint - Use meaningful variable names
- Add comments for non-obvious logic
Testing requirements
Testing requirements
For git engine changes:
- Add tests in
__tests__/folder - Tests should be simple: input commands, check expected tree state
- All existing tests must pass:
yarn test
- Manual testing is usually sufficient
- Include screenshots showing the change
Review process
Review process
- Maintainers will review your PR when available
- Be responsive to feedback and questions
- Make requested changes in new commits (don’t force push)
- Once approved, your PR will be merged
Reporting Issues
When reporting bugs or issues:Provide detailed information
Include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Browser and OS information
- Screenshots or GIFs if relevant
Development Tips
Quick Iteration
For fast development cycles:Running Tests
Browser Testing
After building, simply openindex.html:
Debugging
Use browser developer tools:- Console: Run
debug_copyTree()to export state - Network: Check if assets are loading
- Sources: Set breakpoints in source files
- Elements: Inspect SVG visualization elements
Questions or Need Help?
GitHub Issues
Ask questions or report issues
Pull Requests
View open pull requests for examples