Skip to main content
KiCad welcomes contributions via merge requests on GitLab. This guide will help ensure your contribution can be accepted quickly.

Before You Start

Discuss Large Changes

If you are planning a large change or new feature:
  1. Post to the developer mailing list before you begin substantial work
  2. Check if anyone else is working on it
  3. Ensure it fits into the overall development plans
  4. Get feedback on your approach
This prevents wasted effort and ensures your contribution aligns with KiCad’s direction.

Start Small

New contributors should start with: Gradually work your way up to larger features as you gain familiarity with the codebase.

General Guidelines

1. Use Feature Branches

Always create a new branch for merge requests instead of using your fork’s master branch.
Good branch names:
  • fix/pcbnew-crash-on-export
  • feature/add-svg-export
  • refactor/simplify-footprint-loading

2. Follow Code Style

Ensure your code follows the KiCad Code Style Guide:
  • Use clang-format for formatting
  • Follow naming conventions
  • Match the existing code style in files you modify
  • Run format checks before submitting

3. Follow UI Guidelines

If you are making User Interface changes, follow the User Interface Guidelines:
  • Consistent dialog layouts
  • Proper keyboard shortcuts
  • Accessibility considerations
  • Use wxWidgets sizers appropriately

4. Write Good Commit Messages

Commit messages should: Use a descriptive first line:
Not:
Provide details in the body:
Reference issues:
  • Use Fixes #123 to automatically close issues
  • Use Related to #123 for related issues

5. Descriptive Merge Request Titles

Give merge requests a short and descriptive title that summarizes the major changes:
  • ✅ “Add support for IPC-2581 file import”
  • ✅ “Fix crash when exporting Gerber with missing layers”
  • ✅ “Refactor symbol library loading for better performance”
  • ❌ “Updates”
  • ❌ “Fix bug”
  • ❌ “Changes to pcbnew”

6. Detailed Descriptions

The merge request description should contain:
  • What changed
  • Why it changed
  • How to test it
  • Screenshots for UI changes
  • Related issues or discussions
Example:

GitLab Configuration

Configure Your Fork

Before submitting merge requests, configure your personal fork:

1. Enable CI/CD Visibility

Settings → General → Visibility → CI/CD
  • Set to “Everyone with access”
  • This allows reviewers to see your pipeline results

2. Set Pipeline Timeout

Settings → CI/CD → General pipelines
  • Set timeout to 3 hours or longer
  • KiCad builds can take time, especially on GitLab shared runners

3. Allow Maintainer Commits

When creating your merge request:
  • ✅ Check “Allow commits from members who can merge to the target branch” (bottom of MR form)
  • This allows maintainers to make minor fixes directly

Creating a Merge Request

Step 1: Prepare Your Branch

Step 2: Push to Your Fork

If you rebased:

Step 3: Create the Merge Request

  1. Go to https://gitlab.com/kicad/code/kicad/-/merge_requests/new
  2. Select your fork and branch as source
  3. Select kicad/code/kicad and master as target
  4. Fill in the template:
    • Title
    • Description
    • Related issues
  5. ✅ Check “Allow commits from members who can merge to the target branch”
  6. Submit

CI Pipeline

When you create or update a merge request, the CI pipeline automatically runs:

Build Tests

  • Linux build
  • Windows build
  • macOS build (if applicable)

Code Quality Checks

  • Format check (clang-format)
  • Compiler warnings
  • Build without errors

Unit Tests

  • All QA tests must pass
  • ctest results are checked

What If CI Fails?

Format Check Failure

Build Failure

  • Check the CI logs for error messages
  • Fix the issue locally first
  • Test locally before pushing
  • Ask for help on the merge request if stuck

Test Failure

Code Review Process

What to Expect

  1. Automated checks run immediately (CI pipeline)
  2. Maintainer review - A KiCad maintainer will review your code
  3. Feedback - You may receive comments and change requests
  4. Iteration - Make requested changes and push updates
  5. Approval - Once approved, a maintainer will merge your MR

Responding to Feedback

  • Be responsive to reviewer comments
  • Ask questions if you don’t understand feedback
  • Make requested changes promptly
  • Push updates to the same branch (don’t close and create new MRs)

Resolving Discussions

  • Resolve discussions after addressing comments
  • Use the “Resolve discussion” button on GitLab
  • Add a comment explaining your changes

Common Issues and Solutions

Merge Conflicts

If your branch has conflicts with master:

Format Check Disagreements

If clang-format suggests changes you disagree with:
  1. Check the Code Style Guide for exceptions
  2. Rule 7: Follow existing file formatting when in doubt
  3. Comment on the MR explaining why you deviated
  4. Maintainers will provide guidance

CI Timeout

If your CI pipeline times out:
  1. Check your fork’s pipeline timeout setting (should be 3+ hours)
  2. Consider splitting large changes into smaller MRs
  3. Contact maintainers if issues persist

Best Practices

Keep Changes Focused

  • One feature or fix per merge request
  • Don’t mix refactoring with feature changes
  • Don’t include unrelated formatting changes

Write Tests

When adding new features:

Update Documentation

If your change affects user-facing features:
  • Update relevant documentation
  • Add comments to complex code
  • Update Doxygen comments

Keep Commits Clean

Option 1: Squash Before Merging
  • Maintainers may squash your commits when merging
Option 2: Clean History

Test on Multiple Platforms

If possible, test your changes on:
  • Linux
  • Windows
  • macOS
At minimum, ensure CI passes on all platforms.

After Your MR is Merged

Update Your Local Repository

Celebrate! 🎉

Your code is now part of KiCad! Your contribution helps thousands of users worldwide.

Getting Help

If you need assistance:

Additional Resources

Contributor Recognition

All contributors are recognized in:
  • AUTHORS.txt file in the repository
  • KiCad’s About dialog
  • Release notes for major contributions
Thank you for contributing to KiCad!