Fixing the Last Commit
git add forgotten-file.ts
git commit --amend --no-edit
--amend replaces the previous commit with a new one that includes whatever is currently staged. --no-edit keeps the original commit message; drop it to edit the message instead. Only amend commits that haven’t been pushed yet — amending a shared commit rewrites history others already have.
Change the message or add forgotten changes without creating a new commit.