Fix a Forgotten File
Stage the forgotten file and amend the last commit.
Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
echo b > b.txt
git add b.txt
git commit -q --amend --no-edit
git show --stat --format=%s HEAD | tail -n +2 | sed 's/ *|.*//'Result
a.txt b.txt 2 files changed, 2 insertions(+)
Exercise
Keep message.
git commit --amend Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.