http://stackoverflow.com/questions/17647936/how-do-i-edit-an-incorrect-commit-message-with-tortoisegitgit
If the commit is the head of current branch, that is easy.this
- Context menu -> Git Commit
- Tick "Amend Last Commit" checkbox
- Correct your commit message
- OK
If the commit is the head of other branch, switch to that branch first.日志
- Context menu -> TortoiseGit -> Switch/Checkout
- Choose branch name
- OK
- Follow above 1-4 steps to amend commit message
If the commit is in the middle without any merge between head, you need to reset, amend and cherry-pickblog
- Context menu -> TortoiseGit -> Log
- Select the commit -> Context menu -> Reset
- Hard Reset (this will discard all work contained in commits above the selected commit as well as any un-committed changes in the working directory)
- OK
- Follow above 1-4 steps to amend commit message
- Select from head to one commit above it -> Context menu -> Cherry-pick
- Continue
分为3种状况:get
第一种状况,若是须要修改的commit是当前分支的最新的一个commit,it
在版本库中,右键菜单,提交io
在提交的界面,选择Amend Last Commitast
而后根据须要修改日志信息,包括commit message,日期,做者select
