Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit incorrect commit message in GitHub for Windows

I've managed to muck up a commit message bad enough, that when I read it back, even I can't work out what is says!

This commit hasn't been pushed and I know that the message can be changed with:

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

(thanks to this post)

However, I am using the GitHub for Windows GUI. So is there any way for me to change the commit message without jumping into powershell?

like image 944
james12802 Avatar asked Dec 19 '22 16:12

james12802


2 Answers

For those using github for windows version 2.3 and upper, the rollback command has been removed, so click on the cog wheel then click on "Undo most recent commit".

Note that this will undo only the last commit if you committed more than once so it is not possible to change the message on previous commits.

like image 137
Maurizio In denmark Avatar answered Jan 06 '23 03:01

Maurizio In denmark


Aside from rolling back the entire commit and recreating it this is not possible in the UI. Rolling back performs an equivalent of git reset HEAD^.

enter image description here

like image 21
TimWolla Avatar answered Jan 06 '23 04:01

TimWolla