# 第45关 squash

You have committed several times but would like all those changes to be one commit.

$git log --pretty=oneline 55d9ec9d216767dd1e080c32f5bcff1b3c62ab5b Updating README (squash this commit into Adding README) 749b65067db05a02515c580ad8e791306ff02305 Updating README (squash this commit into Adding README) 1ac3ed61a0ae302cf76dc6f3a37e56e2b5f750f9 Updating README (squash this commit into Adding README) 606be40cc9e5c684cab87c22c37a9d0225308761 Adding README 994f2b3a2df48ef4a406a5c62b4b6f6c8c1fac03 Initial Commit 从查询结果看出，添加了 README 之后来又对它做了3次修改。 找到 "Adding README" 下面一条日志的哈希值 "994f2b3a2df48ef4a4"，执行 reabse 命令：$ git rebase -i 994f2b3a2df48ef4a4

# This is a combination of 4 commits.
# The first commit's message is:

# This is the 2nd commit message:

# This is the 3rd commit message: