Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij "before commit" options meaning

I cannot find the documentation about the several options (checkboxes) that are visible when commiting.

commit options

I'm looking for an option to squash all commits from the IDE, and I'm wondering if one of these options couldn't help me to do that. Is there any official documentation about the different options?

like image 488
Vadorequest Avatar asked Apr 22 '15 12:04

Vadorequest


2 Answers

Here are the brief descriptions of the before commit operations (source):

Operation Description
Reformat code Perform code formatting according to the Project Code Style settings.
Rearrange code Rearrange your code according to the arrangement rules preferences.
Optimize imports Remove redundant import statements.
Perform code analysis Perform code analysis Run code inspection on the files you are about to commit/shelve.
Check TODO (filter name) Review the TODO items matching the specified filter. Click Configure to choose an existing TODO filter, or open the TODO settings page and define a new filter to be applied.
Cleanup Automatically apply the current inspection profile to the files you are going to commit/shelve.
Update copyright Add or update a copyright notice according to the selected copyright profile - scope combination.
like image 90
krizajb Avatar answered Nov 15 '22 05:11

krizajb


Following my original comment, I think there are 2 distinct features:

  1. The before commit section, described in detail here, offers a few code-inspections tasks which Idea will run on your classes before actually committing them. Depending on their output (eg: new TODOs), some may request a confirmation that you indeed want to perform the commit:

before commit options

  1. The squash feature, which I'm not very familiar with yet, is perhaps accessible from the Rebasing Commits Dialog
like image 39
Morfic Avatar answered Nov 15 '22 03:11

Morfic