git logのまとめ方

git rebase -i HEAD^^

 

Vimが起動するので、以下の様に修正

今回はひとつ前のコミットを最新のコミットとあわせる。

 

pick yyyyyyy コミットログ2
pick xxxxxxx コミットログ1

# Rebase yyyyyyy..xxxxxxx onto yyyyyyy
#
# 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
#
# 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 yyyyyyy コミットログ2
f xxxxxxx コミットログ1