Git Workflow Overview
Deno uses a standard GitHub-based git workflow:- The main branch is
main - All development happens in feature branches
- Changes are merged via pull requests
- Commits are squashed when merged
Creating a Feature Branch
Create a descriptive branch
Create a new git branch with a clear, descriptive name:Branch naming conventions:
feature/- New features or enhancementsfix/- Bug fixesdocs/- Documentation updatesrefactor/- Code refactoringtest/- Test additions or improvements
Make your changes
Implement your feature or fix following the style guide.
Committing Your Changes
Commit Messages
Write clear and descriptive commit messages that explain the “why” rather than the “what”: Good commit messages:- Start with a type prefix:
feat,fix,docs,refactor,test,chore - Include the scope in parentheses:
(ext/node),(cli),(runtime) - Use imperative mood: “add” not “added” or “adds”
- Keep the first line under 72 characters
- Add detailed explanation in the body if needed
Making Commits
Don’t worry about having multiple commits - they will be squashed when the PR is merged. Focus on clear, logical commits during development.
Pushing Your Branch
Push your feature branch to the remote repository:Opening a Pull Request
Navigate to GitHub
Go to the Deno repository on GitHub.
Write a clear description
Your PR description should include:
- Summary: What changes you made
- Motivation: Why these changes were necessary
- Context: Links to related issues or discussions
- Testing: How you tested the changes
- Screenshots: If applicable for UI changes
PR Review Process
What to Expect
- Initial review: Maintainers will review your PR within a few days
- Feedback: You may receive requests for changes or clarifications
- Iterations: Multiple rounds of review are common
- CI checks: Automated tests must pass before merging
Responding to Feedback
PR Requirements
Before Submitting
Code Quality
- Code is formatted with
./tools/format.js - No lint errors from
./tools/lint.js - Follows established code patterns
- Includes appropriate error handling
Testing
- All existing tests pass
- New tests added for new functionality
- Edge cases are covered
- Tests follow spec test conventions
Documentation
- Code comments explain complex logic
- JSDoc/rustdoc for public APIs
- README updates if needed
- Examples for new features
Minimal Scope
- Changes are focused and minimal
- No drive-by refactoring
- Separate PRs for unrelated changes
- Clear single purpose
During Review
Never force push - Allows reviewers to see changes
Be responsive - Address feedback promptly
Keep it focused - Don’t expand scope during review
Ask questions - Clarify unclear feedback
Common PR Scenarios
Adding a New CLI Subcommand
Implement command handler
Create the handler in
cli/tools/<command_name>.rs or cli/tools/<command_name>/mod.rs.cli/tools/fmt.rs or complex commands like cli/tools/test/.
Modifying an Extension
After Your PR is Merged
Check the release notes
Your changes will be included in the next release. Check the Releases.md file for updates.
Getting Help
GitHub Issues
Search existing issues for similar questions or problems.
Pull Requests
Review recent PRs for examples of similar changes.
Discord Community
Join the Discord server to ask questions and discuss contributions.
Contributing Guide
Read the full contributing guide for more details.
The Deno maintainers are helpful and welcoming to contributors. Don’t hesitate to ask questions if you’re unsure about anything.