6

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?

Vadorequest
  • 16,593
  • 24
  • 118
  • 215
  • 1
    Not sure about squashing but those options activate/deactivate some code-inspections tasks which are described [here](https://www.jetbrains.com/idea/help/commit-changes-dialog.html) - scroll down to *Before Submit / Before Commit*. Perhaps the [*Rebasing Commits Dialog*](https://www.jetbrains.com/idea/help/rebasing-commits-dialog.html) from the idea docs will be of some help regarding the squash option. – Morfic Apr 22 '15 at 13:43
  • 1
    I don't think you can squash commits using these actions. There is other way to do it from IntelliJ though. See this answer for more details: http://stackoverflow.com/a/26904021/1291150 – Bohuslav Burghardt Apr 22 '15 at 13:48
  • Thanks, both answers are quite useful, I found what I was looking for. @Morfic If you write an answer I'll accept it. (since your answer is what the question is about) – Vadorequest Apr 22 '15 at 14:27

2 Answers2

2

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.
krizajb
  • 1,715
  • 3
  • 30
  • 43
1

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
Morfic
  • 15,178
  • 3
  • 51
  • 61
  • 1
    There is no description of the before commit actions in the links you provided. Maybe they have moved it. It's a lot better if you copy/paste the answer so it stays here. Content on the link can change, link can die etc – krizajb Jan 19 '21 at 16:37