Skip to content

mikolajed/IntelliJ-Git-Plugin

Repository files navigation

IntelliJ-Git-Plugin

Build Version Downloads

Rename your latest Git commit directly from IntelliJ IDEA. Features a multi-line input dialog and validation to prevent empty commit messages.

Features

  • Rename the most recent Git commit via git commit --amend.
  • Multi-line commit message support.
  • Prevents empty messages with a warning and re-prompt.
  • Skips amend if the new message matches the current one.
  • Error handling for failed amend attempts.

Installation

  • Manually: download the latest release and install using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
  • Git: follow developer guide below.

Developer Guide

  1. Clone the Repo:

    git clone https://github.com/mikolajed/IntelliJ-Git-Plugin.git
    cd IntelliJ-Git-Plugin
  2. Open in IntelliJ IDEA:

  • Tested on IntelliJ IDEA 2024.3.5 (Ultimate Edition).
  • Navigate to File > Open and select the cloned folder.
  1. Configure Project Structure:
  • Navigate to File > Project Structure

  • Under SDKs, click + > IntelliJ Platform Plugin SDK and choose your IDEA install dir.

  • Add git4idea to the classpath it might be at a different location.

  • Select the SDK > Classpath tab > + > Navigate to <IDEA_DIR>/plugins/git4idea/lib/git4idea.jar > OK.

  • Apply and close.

    New project SDK Add Git4Idea to the classpath
    Configure Project Structure Git4Idea Classpath
  1. Gradle Sync:
  • File > Sync Project with Gradle Files or click the Gradle elephant icon.
  • Wait for dependencies (JUnit 5, Mockito) to resolve.
  1. Run the Plugin:
  • In IDEA: Run > Run 'Plugin'.
  • Or via Gradle:
./gradlew runIde
  1. Test It: In the sandbox IDEA instance:
  • Create a simple project.

    Plugin location Rename current commit
    Click on git menu Rename current commit
  • Init Git: git init, add files, and create a commit (git commit -m "Initial commit").

  • Navigate to main toolbar > Git > Rename Current Commit and change commit message when prompted.

  1. Build for Distribution: In case you make any changes w.r.t. current release version, you can build the plugin with:
./gradlew buildPlugin

About

Simple IntelliJ plugin for renaming current git commit.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages