I am using Idea IntelliJ Community Edition 2016 and committed a change to GIT. But I have not pushed it. Now when I see my push queue I can see it in the queue. I tried RESET HEAD option
but it did not work. I want to delete that commit. How can I do it in Intellij?
In the latest version, you simply go to version control
, right click the commit and select Undo Commit
. This will put the changes back into a change list (so you can edit if needed) and remove the commit. You can remove the change list / revert the changes if you want them gone completely.
Using the Reset HEAD
option should work too, just make sure to select a correct target and set an appropriate reset type (Mixed
if you want to keep the changes, Hard
if you want the changes gone too). To make it easier to find the target, you can find a Reset Current Branch to Here
option when right clicking a commit in version control
.
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