Skip to content

DetachHead/rebased

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

505,983 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Rebased

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.

Why?

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.

Installation

Linux

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.

Windows

You can either download the installer .exe from GitHub releases or install via winget:

winget install detachhead.rebased --source winget

macOS

Install with homebrew:

brew install detachhead/tap/rebased
Manual 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.app

Exclusive Features

In 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.

Option to disable the .idea directory

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:

  1. Go to Settings > Appearance and Behavior > System Settings
  2. 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.

Additional TextMate bundles

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)

Credits

Contributing

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.

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 --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 1 option after clone.
  • 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.


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.

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

  1. 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=true to idea.properties and 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.
  1. Maven Configuration : If the Maven plugin is disabled, add the path variable "MAVEN_REPOSITORY" pointing to <USER_HOME>/.m2/repository directory.

  2. 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

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=true

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, 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"


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

# 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.ArrayUtilTest

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.

About

A git client based on the IntelliJ platform

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Contributors

Languages

  • Java 52.6%
  • Kotlin 35.1%
  • Python 9.1%
  • HTML 1.4%
  • Starlark 0.9%
  • C++ 0.1%
  • Other 0.8%