Trying to understand, why the Edit commit message function became unavailable.
Any ideas? I'm sure - it's was working before .
According to the docs, this happens because IntelliJ thinks that branch is protected. Fortunately, the same docs provide information on how to configure such branches.
Go to Project Settings (Cmd + , on MacOS | Ctrl + Alt + s on Windows) -> Version Control -> Git and, in the "Push" section, remove the protected branch you want to push altered history to.
You cannot modify the history for protected branches where push --force is not allowed (configure protected branches in the Version Control | Git page of the IDE settings ⌘Сmd, . Note that if a branch is marked as protected on GitHub, IntelliJ IDEA will automatically mark it as protected when you check it out.
Be aware, however, that if the remote branch is indeed protected, you will not be able to push any altered history.
This doesn't directly answer your question within Intellij, however it allows you the edit a pushed commit message.
If you wanted to edit the 6th commit message:
git rebase -i HEAD~6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With