Function: magit-commit-augment

magit-commit-augment is an autoloaded, interactive and byte-compiled function defined in magit-commit.el.

Signature

(magit-commit-augment &optional COMMIT ARGS)

Documentation

Create a squash commit, authoring a new temporary commit message.

If there is a reachable commit at point, target that. Otherwise prompt for a commit. If magit-commit-squash-confirm is non-nil, always make the user explicitly select a commit, in a buffer dedicated to that task.

During a later rebase, when this commit gets squashed into its targeted commit, the user is asked to write a final commit message, in a buffer that starts out containing both the original commit message, as well as the temporary commit message of the squash commit.

In other words, call "git commit --squash=COMMIT --edit".

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-commit.el
;;;###autoload
(defun magit-commit-augment (&optional commit args)
  "Create a squash commit, authoring a new temporary commit message.

If there is a reachable commit at point, target that.  Otherwise prompt
for a commit.  If `magit-commit-squash-confirm' is non-nil, always make
the user explicitly select a commit, in a buffer dedicated to that task.

During a later rebase, when this commit gets squashed into its targeted
commit, the user is asked to write a final commit message, in a buffer
that starts out containing both the original commit message, as well as
the temporary commit message of the squash commit.

In other words, call \"git commit --squash=COMMIT --edit\"."
  (interactive (list (magit-commit-at-point)
                     (magit-commit-arguments)))
  (magit-commit-squash-internal "--squash=" commit args nil 'edit))