Git - Undoing: Fixing Your Mistakes - commit, amend flag
Head First Git: A Learner’s Guide to Understanding Git from the Inside Out、 Raju Gandhi(著)、 O’Reilly Mediaの Chapter 4.(Undoing: Fixing Your Mistakes)、EXERCISE(305/715)の解答を求めてみる。
入出力結果(Terminal, Zsh)
% git branch
* camping-trip
master
% git status
On branch camping-trip
nothing to commit, working tree clean
% git log --oneline
efa799d (HEAD -> camping-trip) final outdoors plan
8d704f8 (master) first cut at invitation card
6e16680 initial set of guests and gift registry
% git commit --amend
[camping-trip d4b64a9] initial outdoors plan
Date: Sat Mar 13 14:48:54 2021 -0500
1 file changed, 17 insertions(+)
create mode 100644 outdoor-supplies.md
% git log --oneline --all --graph
* d4b64a9 (HEAD -> camping-trip) initial outdoors plan
* 8d704f8 (master) first cut at invitation card
* 6e16680 initial set of guests and gift registry
%