Contributing
July 21, 2026 · View on GitHub
AI Code Policy
This project does not accept any AI generated code.
Please also refrain from unnecessarily padding out your issues, comments or PR descriptions using LLMs. Though you may use AI to assist with translations if you aren't fluent in English.
If you are interested in the motivation behind this decision, see here.
Getting the Source Code
This section will guide you through getting the project sources and help avoid common issues in git config and other steps before opening it in the IDE.
Prerequisites
- Git installed
- Install IntelliJ IDEA 2023.2 or higher.
- For Windows set these git config to avoid common issues during cloning:
git config --global core.longpaths true git config --global core.autocrlf input
Clone Main Repository
Rebased is available from the GitHub repository. The master (default) branch contains the source code which is periodically merged with upstream, however Rebased tracks upstream IntelliJ Community releases in separate release branches. Releases are always published from the latest release branch instead of the master branch.
You can clone this project directly using IntelliJ IDEA.
Alternatively, follow the steps below in a terminal:
git clone https://github.com/detachhead/rebased.git
cd rebased
Tip
- For faster download: If the complete repository history isn't needed, create shallow clone
To download only the latest revision of the repository, add
--depth 1option afterclone. - Cloning in IntelliJ IDEA also supports creating shallow clone.
Building Rebased
These instructions will help you build Rebased from source code, which is based on the IntelliJ community edition. IntelliJ IDEA '2023.2' or newer is required.
Important
IntelliJ IDEA project is currently being migrated to the Bazel build system. The migration is still in progress, so you may encounter some rough edges or temporary issues along the way, mostly related to IDE integration.
- Building the project using only IDE built-in capabilities is not supported anymore, so make sure the Bazel plugin is installed and enabled.
- Known issue: some tests are not yet possible to be run with Bazel. In case of any issues, please depend on the
tests.cmdscript mentioned in the Running IntelliJ IDEA in CI/CD environment section.
Opening the Rebased Source Code in the IDE
Using the latest IntelliJ IDEA, click 'File | Open', select the <IDEA_HOME> directory.
If IntelliJ IDEA displays a message about a missing or out-of-date required plugin (e.g. Kotlin),
enable, upgrade, or install that plugin and restart IntelliJ IDEA.
Build Configuration Steps
- JDK Setup
- Use JetBrains Runtime 25 (without JCEF) to compile
- IDE will prompt to download it on the first build
Important
JetBrains Runtime without JCEF is required. If jbr-25 SDK points to JCEF version, change it to the non-JCEF version:
- Add
idea.is.internal=truetoidea.propertiesand restart the IDE. - Go to 'Project Structure | SDKs'
- Click 'Browse' → 'Download...'
- Select version 25 and vendor 'JetBrains Runtime'
- To confirm if the JDK is correct, navigate to the SDK page with jbr-25 selected. Search for
jcef, it should NOT yield a result.
-
Maven Configuration : If the Maven plugin is disabled, add the path variable "MAVEN_REPOSITORY" pointing to
<USER_HOME>/.m2/repositorydirectory. -
Memory Settings
- Ensure a minimum 8GB RAM on your computer.
- With the minimum RAM, disable "Compile independent modules in parallel" in 'Settings | Build, Execution, Deployment | Compiler'.
- With notably higher available RAM, Increase "User-local heap size" to
3000.
Building the Rebased Application from Source
To build Rebased from source, choose 'Build | Build Project' from the main menu.
To build installation packages, run the installers.cmd script in <IDEA_HOME> directory. installers.cmd will work on both Windows and Unix systems.
Options to build installers are passed as system properties to installers.cmd command.
You may find the list of available properties in BuildOptions.kt
Pass --debug to suspend and wait for debugger at port 5005
Installer build examples:
# Build installers only for current operating system:
./installers.cmd -Dintellij.build.target.os=current
Tip
The installers.cmd is used to run OpenSourceCommunityInstallersBuildTarget from the command line.
You can also call it directly from IDEA, using run configuration Build Rebased Installers (current OS).
Dockerized Build Environment
To build installation packages inside a Docker container with preinstalled dependencies and tools, run the following command in <IDEA_HOME> directory (on Windows, use PowerShell):
docker build . --target intellij_idea --tag intellij_idea_env
docker run --rm --user "$(id -u)" --volume "${PWD}:/community" intellij_idea_env
Note
Please remember to specify the --user "$(id -u)" argument for the container's user to match the host's user.
This prevents issues with permissions for the checked-out repository, the build output, if any.
Running Rebased
To run the version of Rebased that was built from source, choose 'Run | Run' from the main menu. This will use the preconfigured run configuration Rebased.
To run tests on the build, apply these settings to the 'Run | Edit Configurations... | Templates | JUnit' configuration tab:
- Working dir:
<IDEA_HOME>/bin - VM options:
-ea
Running Rebased in CI/CD environment
To run tests outside of IntelliJ IDEA, run the tests.cmd command in <IDEA_HOME> directory.tests.cmd can be used in both Windows and Unix systems.
Options to run tests are passed as system properties to tests.cmd command.
You may find the list of available properties in TestingOptions.kt
./tests.cmd --module intellij.idea.community.main.tests
# Run a specific test:
./tests.cmd --module intellij.idea.community.main.tests --test com.intellij.util.ArrayUtilTest
to debug tests use: -Dintellij.build.test.debug.suspend=true -Dintellij.build.test.debug.port=5005
tests.cmd is used just to run CommunityRunTestsBuildTarget from the command line.
You can also call it directly from IDEA, see run configuration tests for an example.