Git commit --amend sorcery

Git amend can add stuff to a previous commit. It's quite handy if you, for example, fix some url's in a test file, commit and then notice you had similar stuff that should've been in the same commit.


Kalle Tolonen
July 8, 2025


To add more stuff to a previous commit you only need to amend it:

git commit --amend

Keep or modify the commit msg and you're all set! This is completely safe if you haven't pushed the commit to remote.


Comments

No published comments yet.

Add a comment

Your comment may be published.