Ad space (banner)
🌿Git Lessons
Lesson 56 / 59

Adding Only Changes with git commit --amend --no-edit

This lesson covers adding just the changes, without touching the message, using git commit --amend --no-edit. It's for anyone searching "git commit --amend --no-edit usage."

git commit --amend --no-edit adds just file changes to your previous commit, while keeping the commit message exactly as it was.

In Try It, run git commit --amend --no-edit. New changes you've staged get folded into the previous commit, while the original commit message is reused unchanged.

A common early mistake is not distinguishing this from regular --amend — add -m if you also want to change the message; use --no-edit when you just want to add files and keep the message as-is, and knowing when to reach for which matters. In real teams, this option gets used often for "I want to fold in one small fix to the previous commit, but I don't want to change the message."

Git
Try it (type this into the pseudo terminal)
git commit --amend --no-edit

🧑‍💻 You can type this command into the Git pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)