Skip to content

Commit 6f2cdd0

Browse files
author
Kaartic Sivaraam
committed
Make the sentence abuot amending to be more accurate
1 parent 6b57805 commit 6f2cdd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/07-git-tools/sections/rewriting-history.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ That drops you into your text editor, which has your last commit message in it,
2525
When you save and close the editor, the editor writes a new commit containing that message and makes it your new last commit.
2626

2727
If you’ve committed and then you want to change the snapshot you committed by adding or changing files, possibly because you forgot to add a newly created file when you originally committed, the process works basically the same way.
28-
You stage the changes you want by editing a file and running `git add` on it or `git rm` to a tracked file, and the subsequent `git commit --amend` takes your current staging area and makes it the snapshot for the new commit.
28+
You stage the changes you want by editing a file and running `git add` on it or `git rm` to a tracked file, and the subsequent `git commit --amend` takes your current staging area and adds it to the last snapshot making it the snapshot of the last commit.
2929

3030
You need to be careful with this technique because amending changes the SHA-1 of the commit.
3131
It’s like a very small rebase – don’t amend your last commit if you’ve already pushed it.

0 commit comments

Comments
 (0)