Daily Software Tips & Tricks
Bite-sized knowledge to improve your coding skills daily.
Did You Forget a File? Use Git Amend!
February 5, 2026
We’ve all done it: you commit your feature, hit push, and then realize you forgot to stage that one crucial configuration file or fix a tiny typo. Instead of creating a messy 'Fixing typo' commit right afterward, use `git commit --amend`. First, stage the missing file (`git add missing_file.js`), then run the amend command. This merges your new staged changes into the *previous* commit, keeping your history clean and tidy. Just remember not to amend commits you've already pushed to a shared remote branch!