Don’t amend public commits

Add staged changes to previous commit

With no message change.

git commit --amend --no-edit

Changing the message.

git commit --amend -m "an updated commit message"

If you wish to open the editor for message.

git commit --amend

Running the last two with no staged changes will only edit the message.