直前(1世代前)のコミットコメント書き換え
1 |
$ git commit --amend |
2世代以上前のコミットコメント書き換え
リベースする
1 |
$ git rebase -i HEAD~3 |
再コミットするコミットを指定する
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
pick eeb019d delete the fold lines pick 83235ee brush up the cutting lines pick 87ded2d update the version : 0.4.0 # Rebase f55fdf9..87ded2d onto f55fdf9 (3 commands) # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell # d, drop = remove commit # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # # However, if you remove everything, the rebase will be aborted. # # Note that empty commits are commented out |
行頭のpick を edit に書き換えて上書き保存する。
再コミットする(コメントを書き換える)
1 |
$ git commit --amend |
リベースを継続する
1 |
$ git rebase --continue |