Git: Amend the last commit
A short, tested Git example for amend the last commit. Copy it and adjust the names and paths for your project.
Git
git commit --amend -m "Better message"
git add forgotten.txt && git commit --amend --no-editAmending rewrites history. Don't do it to commits you've already pushed to a shared branch.
Find it in Zest
Search for “git amend the last commit” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.