Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change a past git commit+push message in RubyMine?

I accidentally gave a wrong message and pushed a commit with it using RubyMine. Is there any way I can correct it? RubyMine way would be preferred not to mess up git, but other trusted ways are also welcome.

like image 453
Davit Avatar asked Apr 07 '13 14:04

Davit


1 Answers

As you said, you already pushed, so it's wise not to change the commit message. The reason for that is that the commit will get another hash which makes git think that the commit you already pushed and the commit whose commit message you changed are different. That is bad! You can force push with git push -f and that's absolutely okay if you are working alone, but if you are working in team, I suggest you not to change that commit message.

For anything else, take a look here: How to modify existing, unpushed commits?

like image 105
Max Beikirch Avatar answered Nov 08 '22 19:11

Max Beikirch