$ git logcommit 0c28141c68adae276840f17ccd4766542c33cf1dAuthor: First LastDate: Wed Aug 8 15:55:52 2018 -0600
Errata commit:This commit has no substantive code change.This commit is provided only to document a correction to a previous commit message.This pertains to commit object e083a7abd8deb5776cb304fa13731a4182a24be1Original incorrect commit message:Changed background color to redCorrection (*change highlighted*):Changed background color to *blue*
commit 032d0ff0601bff79bdef3c6f0a02ebfa061c4ad4Author: First LastDate: Wed Aug 8 15:43:16 2018 -0600
Some interim commit message
commit e083a7abd8deb5776cb304fa13731a4182a24be1Author: First LastDate: Wed Aug 8 13:31:32 2018 -0600
Changed background color to red
Rebase maps ~
ri Perform an interactive rebase. Uses ancestor ofu commit under cursor as upstream if available.
rf Perform an autosquash rebase without editing the todolist. Uses ancestor of commit under cursor asupstream if available.
ru Perform an interactive rebase against @{upstream}.
rp Perform an interactive rebase against @{push}.
rr Continue the current rebase.
rs Skip the current commit and continue the currentrebase.
ra Abort the current rebase.
re Edit the current rebase todo list.
rw Perform an interactive rebase with the commit underthe cursor set to `reword`.
rm Perform an interactive rebase with the commit underthe cursor set to `edit`.
rd Perform an interactive rebase with the commit underthe cursor set to `drop`.
r<Space> Populate command line with ":Git rebase ".
r? Show this help.
获取提交列表。
:Git log --oneline
我想修复第12行(4d43a1b build(MPL-402): editorconfig fix for messges.json)的提交消息,因为它不是正确的常规提交格式。
我将光标放在提交哈希4d43a1b上并键入rw
这将“执行交互式rebase,将光标下的提交设置为reword”。请注意,与git rebase -i HEAD~X相比,这有多好-知道X是什么并不那么简单。