A git client based on the IntelliJ platform.
Rebased is an open-source remake of the short-lived jetbrains git client. It's basically just a JetBrains IDE with all the bundled plugins removed except the git integration, with some additional UI tweaks.
See this youtrack issue for the many reasons people have been requesting this for almost a decade. At the time of writing, it's the #3 most upvoted open issue on YouTrack.
Download the appimage from GitHub releases.
We recommend using either AppManager or Gear Lever to install it to your applications menu, and for automatic updates.
You can either download the installer .exe from GitHub releases or install via winget:
winget install detachhead.rebased --source wingetInstall with homebrew:
brew install detachhead/tap/rebasedManual installation
Download the .dmg from GitHub releases
After copying Rebased.app to your Applications folder, you may see the following error message:
"Rebased.app" is damaged and can't be opened. You should move it to the Bin.
This is Apple lying to you. Nothing is "damaged", it's just not code-signed with an Apple Developer certificate. To fix it, run the following command:
xattr -rd com.apple.quarantine /Applications/Rebased.appIn addition to all the git-related features from IntelliJ IDEA Community Edition, Rebased has some additional features which aren't available in any of the official JetBrains IDEs.
Unlike the .vscode directory, most of the config files generated by JetBrains IDEs are unfortunately not suitable to commit, as they often contain device-specific file paths that don't work if shared with other members of your team.
Rebased is intended to be used with a wider variety of projects, which means you're more likely to use it with repos that weren't intended to be opened in a JetBrains IDE. This means .idea config files aren't committed nor are they excluded in .gitignore. This results in Rebased generating unwanted config files most of the time.
To address this problem, Rebased allows you to disable the creation of the .idea directory in the project root:
- Go to Settings > Appearance and Behavior > System Settings
- Uncheck "Store project settings in the project root directory"
Note
This does not disable project-level config. Instead, Rebased will store each project's config inside a single centralized .idea directory in the same place as the IDE's global settings.
IntelliJ Community Edition includes syntax highlighting for many languages, even when their corresponding language plugin is not installed, thanks to the TextMate Bundles plugin.
Unfortunately however, syntax highlighting is only available for some languages in their respective paid plugins/IDEs.
One of the goals of Rebased is to prevent users from having to install bloated plugins when they only want basic editor/git functionality, so we ship some additional TextMate bundles that aren't present in IntelliJ:
(currently only one language, but feel free to open an issue or PR for others)
- https://github.com/obiscr/intellij-community - a previous attempt at creating a JetBrains git client that I cherrypicked some commits from
- JetBrains (obviously)
Note
This section is mostly unchanged from the upstream intellij-community repo, but with a few small tweaks to match the changes I've made to the build process.
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.
- 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
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 --recurse-submodules
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.
Note
This project requires additional Android modules from separate Git repositories, which is why --recurse-submodules is needed. Ideally these should not be needed since Rebased
is not built with the Android plugin, but it seems too tightly integrated with the codebase to be able to easily remove it. So for now I've kept it as a git submodule instead of
relying on a script. This way, the project is always pinned to a version of the android repo that works with it.
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.
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.
- JDK Setup
- Use JetBrains Runtime 21 (without JCEF) to compile
- IDE will prompt to download it on the first build
Important
JetBrains Runtime without JCEF is required. If jbr-21 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 21 and vendor 'JetBrains Runtime'
- To confirm if the JDK is correct, navigate to the SDK page with jbr-21 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.
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
Installer build examples:
# Build installers only for current operating system:
./installers.cmd -Dintellij.build.target.os=current# Build source code _incrementally_ (do not build what was already built before):
./installers.cmd -Dintellij.build.incremental.compilation=trueTip
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).
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_envNote
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, and the mounted Maven cache, if any.
To reuse the existing Maven cache from the host system, add the following option to docker run command:
--volume "$HOME/.m2:/home/ide_builder/.m2"
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
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
# Build source code _incrementally_ (do not build what was already built before): `
./tests.cmd -Dintellij.build.incremental.compilation=true#Run a specific test:
./tests.cmd -Dintellij.build.test.patterns=com.intellij.util.ArrayUtilTesttests.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.
