practicalli / spacemacs

Content for the book - Clojure Development with Spacemacs
https://practical.li/spacemacs
Creative Commons Attribution Share Alike 4.0 International
110 stars 33 forks source link

Magit tips - cycle through previous commit messages #208

Closed practicalli-johnny closed 4 years ago

practicalli-johnny commented 4 years ago

g k will paste the previous commit message in the commit message buffer when creating a commit in Magit. Further g k key presses will cycle backwards through the previous commit messages

g j will cycle forwards through commit messages

Scrolling through the commit history is a simple way to create consistent style of commit messages without having to look at previous commits separately.

Commit messages are remembered even after a reset (tested with soft reset)

Previous messages are only available once a commit is made. If a change is cancelled, , k before the commit then the message is not saved. Instead, select the message and yank into the kill ring before killing the commit.

practicalli-johnny commented 4 years ago

https://github.com/practicalli/spacemacs-content/commit/2039a4eeaca8bbd31b4d677938c5dc26fb8e8bf4