Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 538 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 538 Bytes

Git kata: Amending commits

When we are working, we make a lot of commits. Sometimes we just forget something obvious that we want to fix quickly.

git commit --amend allows us to do that - tinker with the last commit we made.

Setup:

  1. Run . setup.sh (or .\setup.ps1 in PowerShell)

The task

  1. What does git status tell us?
  2. What does git log tell us?
  3. Stage the addition of bar.txt
  4. Run git commit --amend
  5. What happened? What does git log tell us?
  6. What happens if you run git commit --amend again?