DSC05851

Edit the last local Git commit message

Sometimes I want to edit the last local commit message:

git commit --amend

Make your changes then save and quit VIM with:

:wq

Or to re write the whole commit message in one line:

git commit --amend -m "New commit message"

Source: http://stackoverflow.com/a/179147

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s