Can one amend a git commit message using IntelliJ
, or should one resort to command line?
How can this be done please?
You can also go to your git folder with a terminal and shell like powershell, cmd or bash (depends on your system), and then type:
git commit --amend -m "your new commit message"
In the Log tab, select the commit and press F2 (Reword). Thats it.
View => Tool Windows => Version Control. (Windows (Alt + 9) / OS X (Cmd + 9))
IntelliJ 2017.1 and higher => Go to Log and right click + reword or press F2.
While you are on the same branch, ( your checked out branch is the same )
Amend is supported: invoke "Commit Changes" and select the checkbox "Amend commit" in the Commit Dialog. Then press "Commit" button, and the commit will be amended to the previous one.
However, the support is limited:
In JetBrains
Go to View -> Version Control
-> This would open the version control log tab to the bottom of the screen
Go to Log
and you can see the commit that you did last
Right click on it, and select undo commit
Bingo! You have reverted all your commit and the message is erased. You can also choose to do soft reset in case you only want to change the commit mesage
In case, 2018.3 and same with 2017.1
Alt + 9 (version control window)
And right click -> context menu click "Reword... F2 "
OR
shorcut F2 You can edit message.