From be569c660563e17517dc3a2d910182940ddd6cd3 Mon Sep 17 00:00:00 2001 From: sharpiro Date: Thu, 21 May 2020 09:44:50 -0400 Subject: [PATCH 1/2] fix 'Splitting a Commit' rebase bug The first commit in the rebase script `f7f3f6d` should be unmodified after the script is complete --- book/07-git-tools/sections/rewriting-history.asc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/07-git-tools/sections/rewriting-history.asc b/book/07-git-tools/sections/rewriting-history.asc index be5c5191a..4c98eda48 100644 --- a/book/07-git-tools/sections/rewriting-history.asc +++ b/book/07-git-tools/sections/rewriting-history.asc @@ -292,10 +292,10 @@ $ git log -4 --pretty=format:"%h %s" 1c002dd Add cat-file 9b29157 Add blame 35cfb2b Update README formatting -f3cc40e Change my name a bit +f7f3f6d Change my name a bit ---- -Once again, this changes the SHA-1s of all the commits in your list, so make sure no commit shows up in that list that you've already pushed to a shared repository. +This changes the SHA-1s of the three most recent commits in your list, so make sure no changed commit shows up in that list that you've already pushed to a shared repository. Notice that the last commit (`f7f3f6d`) in the list is unchanged. Despite this commit being shown in the script, because it was marked as ``pick'' and was applied prior to any rebase changes, Git leaves the commit unmodified. ==== The Nuclear Option: filter-branch From 0f1a8e431d8cbe0e5b804b1062fdea0934662030 Mon Sep 17 00:00:00 2001 From: sharpiro Date: Sat, 23 May 2020 08:34:48 -0400 Subject: [PATCH 2/2] move new sentences to new source lines --- book/07-git-tools/sections/rewriting-history.asc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/book/07-git-tools/sections/rewriting-history.asc b/book/07-git-tools/sections/rewriting-history.asc index 4c98eda48..95a37e6ef 100644 --- a/book/07-git-tools/sections/rewriting-history.asc +++ b/book/07-git-tools/sections/rewriting-history.asc @@ -295,7 +295,9 @@ $ git log -4 --pretty=format:"%h %s" f7f3f6d Change my name a bit ---- -This changes the SHA-1s of the three most recent commits in your list, so make sure no changed commit shows up in that list that you've already pushed to a shared repository. Notice that the last commit (`f7f3f6d`) in the list is unchanged. Despite this commit being shown in the script, because it was marked as ``pick'' and was applied prior to any rebase changes, Git leaves the commit unmodified. +This changes the SHA-1s of the three most recent commits in your list, so make sure no changed commit shows up in that list that you've already pushed to a shared repository. +Notice that the last commit (`f7f3f6d`) in the list is unchanged. +Despite this commit being shown in the script, because it was marked as ``pick'' and was applied prior to any rebase changes, Git leaves the commit unmodified. ==== The Nuclear Option: filter-branch