Skip to content

An IntelliJ Plugin to prevent making commits without local git.user and git.mail.

Notifications You must be signed in to change notification settings

tnglemongrass/git-identity-checker

Repository files navigation

Git Identity Checker

This is an IntelliJ plugin to prevent making commits without local user.name and user.email.

In runs as part of the standard 'commit' button action and shows an error message if this condition is not found.

Motivation is to prevent commits under the wrong mail address when working on multiple repositories (work, private, GitHub, BitBucket,...).

Features

  • Automatic check before each commit, shows yes/no warning dialog if no local name/mail are found.
  • Manual check via "Tools" menu and "Check Local Git Config...".
  • Check when opening a repository, shows a notification if no local name/mail are found.

commit warning

Installation

Via Marketplace

This plugin is available via JetBrains Marketplace as Git Identity Checker.

Via Repository

Development

Requirements

  • IntellijIDEA 2023.2.4 or later
  • Written in Kotlin, Gradle, ...

Running and Debugging

  • Open the project in IntelliJ, set breakpoints and click the debug icon next to "Run Plugin". This will start the runIde gradle task, open a new IntelliJ Community Edition window and stop on breakpoints.
  • There is also a log available in the child IDE, menu 'Help', 'Open Log in Editor', look for lines containing "GitIdentityChecker".

Where is the code?

  • All the commit check logic is in src/main/kotlin/com/github/OnCommit.kt
  • The plugin components are registered in src/main/resources/META-INF/plugin.xml
  • The two other ways to check are in OnStartup.kt and OnMenuAction.kt

Screenshots

Release Process

About

An IntelliJ Plugin to prevent making commits without local git.user and git.mail.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages