跳转到内容

Commit changes

此内容尚不支持你的语言。

Git is the version control system of Ferris IDEA; there is no other. The Commit tool window lists your changes, the gutter marks them line by line, and a commit runs your repository’s own hooks. Git from status to rebase, with hooks: Works. Changelists and the commit message history: Experimental.

The Commit tool window on the left lists OrderController.java ticked under Changes and Discount.java unticked under Unversioned Files; below them the Amend last commit switch with the last commit, the empty Commit message field and the buttons Commit and Commit and Push…
Commit tool window with one changed and one new file in a throwaway demo project · ferris-idea drive screenshot · v1.6.0 release build, 2026-12-04
  • A Git repository. Ferris IDEA finds the repository the project lies in, and nested ones up to four folders deep. To get one from a server, see Push, pull and clone.
  • Git installed. Status, diff, log, blame, commit and switching branches run inside Ferris IDEA; network operations, stash, rebase, cherry-pick, revert and reset call the git on your PATH.
  • Your name and e-mail in Git’s configuration (git config --global user.name and user.email).

Open the Commit tool window with ⌘0 (Alt0), or Git › Commit… (⌘K, CtrlK). It opens on the left, in place of the Project tree, with the focus in the message field.

  • Changed files are listed under Changes, new files under Unversioned Files. Tracked files are ticked, unversioned ones are not.
  • Files with unsaved changes in an editor are listed too and saved before the commit.
  • Group By shows the files by Directory (⌃P) or Module (⌃M). F4 opens a file in the editor.
  • The list follows changes made outside Ferris IDEA within two seconds.

Double-click a file, or select it and press ⌘D (CtrlD). The diff opens as a tab with HEAD on the left and Working copy on the right, with syntax colours and changed words marked.

  • U or the switch in the header changes to a unified view; the choice is remembered.
  • F7 and ⇧F7 go to the next and previous change. At the last change of a file, F7 again goes to the next file.
  • The » arrows take a HEAD block into your working copy. Only the working copy can be changed; HEAD, branches and stashes are read-only.

To compare any two files, select both in the Project tree and press ⌘D. To compare the current file with another branch, use Git › Compare with Branch… in the editor’s context menu.

OrderController.java in the editor with a green change bar in the gutter beside lines 13 to 15, where a DeleteMapping method was added; the author Robin Park is shown after the class and method declarations
Change markers for three added lines · ferris-idea drive screenshot · v1.6.0 release build, 2026-12-04

While you edit, a bar in the gutter marks added and modified lines, and a mark shows where lines were deleted, against the last commit. Click a marker to open the change bar:

  • the text as it was in HEAD (up to 12 lines),
  • ↑ and ↓ to the previous and next change,
  • Rollback (⌥⌘Z, CtrlAltZ) to restore those lines, as one undo step,
  • Show Diff and Copy,
  • a message field: type a message and press ↩ to commit only this change.
  1. Tick the files to commit.
  2. Type the message. ⌃M in the field opens the last 25 messages of this project.
  3. Click Commit or press ⌘↩ (CtrlEnter). Commit and Push… commits and then opens the push dialog.

Only the ticked files go into the commit; other changes, staged or not, stay as they are.

Turn on Amend last commit (⌃⌥M, AltM). It shows the last commit’s short id and subject and fills in its message. You can change only the message, or add files. The author is kept unless you set one.

The gear button (⌃O) opens the options: Author, as Name <email>, and Run Git hooks when the repository has hooks.

A commit runs the repository’s pre-commit, prepare-commit-msg, commit-msg and post-commit hooks, found the way Git finds them (core.hooksPath included) and run when the file is executable.

  • Hooks see exactly the files of the commit. A formatter in pre-commit that runs git add changes what is committed, as on the command line.
  • While hooks run, the button says Committing….
  • A failing pre-commit, prepare-commit-msg or commit-msg, or one that runs longer than five minutes, stops the commit with “Commit blocked by pre-commit hook (exit 1)” and the last 200 lines of its output. Your message and ticks are kept.
  • post-commit output is shown; its exit code does not undo the commit.
  • Untick Run Git hooks to skip pre-commit and commit-msg for one commit, like git commit --no-verify. prepare-commit-msg and post-commit still run.

The gutter’s one-change commit runs the hooks too. pre-push is run by Git itself when you push.

Select files in the Commit tool window and click Rollback (⌥⌘Z). A strip in the window asks to confirm, with an option to also delete files you added (off by default). Unversioned files are never rolled back.

Changelists split your changes into named groups that you commit separately; they exist only in Ferris IDEA, Git does not know them. With more than the default list Changes, the Commit tool window shows one group per list.

  • New Changelist… and Delete Changelist are in the Changelists button of the toolbar.
  • Move to Another Changelist… (⇧⌘M) moves the selected files.
  • Set Active Changelist (⌃Space) chooses where new changes go.
  • Edit Changelist… (F2) renames it.

A file belongs to one list as a whole; there are no partial changelists. Up to 100 lists, kept in .ferris-idea/changelists.toml.

No partial or hunk commits from the Commit window (the gutter commits one change), no sign-off or commit signing, no code analysis before a commit, no shelf, and no other version control system.

  • “Commit blocked by … hook”: read the hook’s output under the message, fix the problem and commit again, or untick Run Git hooks if you mean to skip it.
  • A file is missing from the list: it is ignored by .gitignore, or it lies in a nested repository deeper than four folders.
Keyboard of
ActionShortcut
Commit⌘0Alt0
Git › Commit⌘KCtrlK
Git › VCS Operations⌃VAlt`
MoveChangesView.Move⇧⌘MAltShiftM
Next diffNextDiffF7F7
Previous diffPreviousDiff⇧F7ShiftF7
Rollback changed linesVcs.RollbackChangedLines⌥⌘ZCtrlAltZ
Show commit optionsChangesView.ShowCommitOptions⌃OCtrlO
Show diffDiff.ShowDiff⌘DCtrlD
Show message historyVcs.ShowMessageHistory⌃MCtrlM
Toggle amend commit modeVcs.ToggleAmendCommitMode⌃⌥MAltM
Vcs show next change markerVcsShowNextChangeMarker⌃⌥⇧↓ShiftCtrlAlt↓
Vcs show prev change markerVcsShowPrevChangeMarker⌃⌥⇧↑ShiftCtrlAlt↑

⌃V (Alt`) opens the VCS Operations popup with the numbered entries Commit…, Commit File…, Rollback…, Show History, Annotate with Git Blame, Show Diff, Branches…, Push…, Stash Changes… and Unstash Changes….

Reading status, diffs and history needs no right. git_commit and git_rollback need the right vcs-write; git_commit runs the hooks unless the call says no_verify.

  • changelistschangesdry run by defaultwriteThe project's changelists: IDE-only named groups of changed files, one active, kept per user in .ferris-idea/changelists.toml (Git knows nothing of them).
  • git_commitchangesdry run by defaultvcs-writeCommit the working-tree state of the given files on top of HEAD; other changes stay out.
  • git_diffreadsChanges of a workspace file against the last commit (HEAD): line markers (added, modified, deleted with 1-based line ranges) and unified hunks.
  • git_line_changechangesdry run by defaultvcs-writeOne change (gutter marker) of a workspace file against HEAD.
  • git_rollbackchangesdry run by defaultvcs-writeRoll files back to HEAD, as Rollback in the Commit tool window: a file in HEAD gets its HEAD content in the working tree and the index (a file open in the window gets HEAD's text in its editor, which is saved, as one undo step: Undo gives back the earlier text, unsaved changes included, SPEC-0220 v5); a file added since HEAD leaves the index and stays on disk as unversioned, or is deleted with delete_added=true (refused while it has unsaved changes in an editor).
  • git_statusreadsGit status of the workspace's repository: per path the staged change (HEAD → index) and the unstaged change (index → working tree; untracked files as added).