Today I Learned

hashrocket A Hashrocket project

Amend Commits With Fugitive

Let's assume you are using fugitive for Git integration with Vim. You've made a commit that you want to amend. First, stage any changes that should be included in the amend with :Gstatus or :Ge:. Then hit ca to open up the commit window for amending. Save and quit when you are finished.

Want to view the aggregate changes? Open the commit window for amending in verbose mode with cva.

See the vim-fugitive docs for more details.

See More #vim TILs
Every developer at Hashrocket is a Vim expert. Check out our development environment, Dotmatrix, and if you are in Chicago, come to the Vim Chicago Meetup hosted at our Chicago office.