Skip to content

Commit a51d716

Browse files
committed
Add Reword A Commit Message With Fugitive as a Vim TIL
1 parent 59de2fe commit a51d716

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
1010

1111
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
1212

13-
_1673 TILs and counting..._
13+
_1674 TILs and counting..._
1414

1515
See some of the other learning resources I work on:
1616

@@ -1855,6 +1855,7 @@ If you've learned something here, support my efforts writing daily TILs by
18551855
- [Replace A Character](vim/replace-a-character.md)
18561856
- [Reset Target tslime Pane](vim/reset-target-tslime-pane.md)
18571857
- [Reverse A Group Of Lines](vim/reverse-a-group-of-lines.md)
1858+
- [Reword A Commit Message With Fugitive](vim/reword-a-commit-message-with-fugitive.md)
18581859
- [Rotate Everything By 13 Letters](vim/rotate-everything-by-13-letters.md)
18591860
- [Rotate The Orientation Of Split Windows](vim/rotate-the-orientation-of-split-windows.md)
18601861
- [Running Bundle With vim-bundler](vim/running-bundle-with-vim-bundler.md)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Reword A Commit Message With Fugitive
2+
3+
When you have the fugitive summary buffer (`:Gedit :`) open and there are
4+
unpushed commits, you'll see them listed below the working tree and staging area
5+
details. If you notice an issue with the wording of any of those commits, you
6+
can initiate an interactive rebase to reword the commit from that window.
7+
8+
Navigate the cursor over that commit and then hit `rw` (for _reword_).
9+
10+
This will split open an interactive rebase buffer with `reword <SHA>`. Save that
11+
buffer and the commit message will be opened into a buffer where it can be
12+
amended, just like if you were to amend a commit with an interactive rebase from
13+
the CLI.
14+
15+
The `rw` binding can be used in any fugitive view where commits are listed. For
16+
instance run `:Git log`, navigate to any commit, and then hit `rw`.
17+
18+
See `:h fugitive_r` for details about all the rebase mappings.

0 commit comments

Comments
 (0)