1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-05 08:08:02 +00:00

Add Reword A Commit Message With Fugitive as a Vim TIL

This commit is contained in:
jbranchaud
2025-10-29 22:26:37 -05:00
parent 59de2fef0d
commit a51d716e45
2 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Reword A Commit Message With Fugitive
When you have the fugitive summary buffer (`:Gedit :`) open and there are
unpushed commits, you'll see them listed below the working tree and staging area
details. If you notice an issue with the wording of any of those commits, you
can initiate an interactive rebase to reword the commit from that window.
Navigate the cursor over that commit and then hit `rw` (for _reword_).
This will split open an interactive rebase buffer with `reword <SHA>`. Save that
buffer and the commit message will be opened into a buffer where it can be
amended, just like if you were to amend a commit with an interactive rebase from
the CLI.
The `rw` binding can be used in any fugitive view where commits are listed. For
instance run `:Git log`, navigate to any commit, and then hit `rw`.
See `:h fugitive_r` for details about all the rebase mappings.