If you go to Changelist -> Log, and there select the commit, you've got a change detail in the right panel. There you can select all and click a button (or right click -> revert selected changes).

Answer from c0stra on Stack Overflow
๐ŸŒ
JetBrains
jetbrains.com โ€บ help โ€บ idea โ€บ undo-changes.html
Undo changes in Git repository | IntelliJ IDEA Documentation
May 5, 2026 - If you are more used to the staging concept, select the Enable staging area option in the Version Control | Git settings page Ctrl+Alt+S. Also, by default IntelliJ IDEA suggests adding each newly created file under version control. You can change this behavior in Settings | Version Control | Confirmation using When files are created and When files are deleted settings respectively. IntelliJ IDEA allows you to undo the last commit in the current branch. You cannot undo a commit if it was pushed to a protected branch, that is a branch to which force --push is not allowed (configure protected branches in the Version Control | Git settings page Ctrl+Alt+S) Note that if a branch is marked as protected on GitHub, IntelliJ IDEA will automatically mark it as protected when you check it out.
Discussions

intellij idea - How to revert a unpushed git commit - Stack Overflow
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... More on stackoverflow.com
๐ŸŒ stackoverflow.com
intellij idea - How to revert commit file but not pushed - GIT - Stack Overflow
I commit the file vie IntelliJ. But I didn't push. How Can I remove this commit? I am new to GIT so pls clarify. I checked other questions, it says only about commit. Not sure whether they push... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Git + Intellij - How to revert a local commit? - Stack Overflow
Working with git and intellij I have accidently commmited my changes to my local branch. I want to revert the commmit but keep the changes as before (ready for next commit). I have looked in thi... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Undo multiple commits but keep local changes.

You can reset the head on your checked out branch to any hash you'd like in your history. It won't make changes to the files in your workspace without the -hard flag, so just do a reset to whatever commit you'd like, without passing it -hard.

This, of course, ignores whatever "Intellij" is, but you asked a question in "r/git", and that's how what you asked is addressed with Git.

More on reddit.com
๐ŸŒ r/git
9
6
April 27, 2021
๐ŸŒ
YouTube
youtube.com โ€บ watch
How To Revert Commit Using IntellliJ? Git Revert | Resolve Conflicts During Git Revert In IntelliJ | - YouTube
We don't use git commands explicitly to perform git operations. Instead, we use the GUI provided by IDE. So we will learn below topics in this video - 1. How...
Published ย  September 21, 2023
๐ŸŒ
JetBrains
jetbrains.com โ€บ guide โ€บ tips โ€บ undo-last-commit
Undo your Last Commit - JetBrains Guide
February 17, 2023 - In the Git tool window, find the most recent commit. Itโ€™s the one at the top. When we select it, we get more detail about the commit. We can double-click the file to see a diff of the change. When you right-click on a commit, you get some actions you can take on it. Some might be grayed-out. For example, if we right-click on an older, pushed commit, weโ€™ll see โ€œUndo Commitโ€ is grayed-out.
๐ŸŒ
JetBrains
intellij-support.jetbrains.com โ€บ hc โ€บ en-us โ€บ community โ€บ posts โ€บ 4402770373650-Reset-a-single-file-only-to-a-specific-commit
Reset a single file only to a specific commit โ€“ IDEs Support (IntelliJ Platform) | JetBrains
June 23, 2021 - git checkout 25484aadb20bad868...ContactAdvicedController.java ... 2. In the opened tool window, select the revision you want to revert to, right-click on it, and select "Revert commit"...
๐ŸŒ
JetBrains
intellij-support.jetbrains.com โ€บ hc โ€บ en-us โ€บ community โ€บ posts โ€บ 206884545-How-to-undo-a-commit-in-a-local-branch-git
How to undo a commit in a local branch - git โ€“ IDEs Support (IntelliJ Platform) | JetBrains
January 30, 2013 - To undo local unpushed commits in Git you have to use the reset command. If you want to keep code changes, you need the "mixed" mode (which is the default mode). There is also VCS | Git | Reset HEAD action in IntelliJ IDEA, but it doesn't support ...
Find elsewhere
๐ŸŒ
JetBrains
jetbrains.com โ€บ help โ€บ rider โ€บ Undo_changes.html
Undo changes in Git repository | JetBrains Rider Documentation
May 5, 2026 - If you have committed changes in ... dropped changes will be deleted. In the Log tab of the Git tool window Alt+9, select the local branch and then the commit with the changes you want to drop....
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 58875508 โ€บ how-to-revert-my-git-remote-branch-into-previous-commit-in-intellij
How to revert my git remote branch into previous commit in intelliJ? - Stack Overflow
I think the easiest solution would be to create another branch off of master (or whatever your PR is going into) and do a git merge --squash to make it a single new commit then restart your PR.
๐ŸŒ
Medium
visatch.medium.com โ€บ how-to-recover-all-your-code-when-accidentally-using-git-reset-hard-with-intellij-idea-d11c95ced761
How to recover all your code when accidentally using Git Reset Hard with Intellij Idea | by Visa | Medium
August 3, 2019 - The Local History is in the VSC toolbar of Intellij Idea where you can revert the file from the history of a local machine and this feature saved the history for a few days.
๐ŸŒ
JetBrains
jetbrains.com โ€บ help โ€บ idea โ€บ edit-project-history.html
Edit Git project history | IntelliJ IDEA Documentation
In the Log tab of the Git tool window Alt+9 select the commits that you want to combine into one and choose Squash Commits from the context menu. In the dialog that opens, edit the commit message (by default, it contains the messages from both ...
๐ŸŒ
JetBrains
jetbrains.com โ€บ help โ€บ idea โ€บ commit-and-push-changes.html
Commit and push changes to Git repository | IntelliJ IDEA Documentation
June 5, 2026 - Normally, you need to perform pull to synchronize with the remote before you update it with your changes. The git push --force command disables this check and lets you overwrite the remote repository, thus erasing its history and causing data loss.
๐ŸŒ
Squash
squash.io โ€บ how-to-undo-a-git-commit-before-push
How to Undo/Revert a Git Commit Before Push - Squash Labs
October 28, 2023 - To undo a Git commit before push, you can use the "git reset" command or the "git revert" command.
๐ŸŒ
JetBrains
intellij-support.jetbrains.com โ€บ hc โ€บ en-us โ€บ community โ€บ posts โ€บ 205803359-Revert-to-previous-commit
Revert to previous commit? โ€“ IDEs Support (IntelliJ Platform) | JetBrains
Complete newbie question: How do I revert to a version 2 commits earlier?Reverting to a previous version of single files seems pretty predictable, butI'm pretty dumbfounded by changelists, partial ...
๐ŸŒ
YouTube
youtube.com โ€บ watch
How to Undo Commits in any JetBrains IDE - YouTube
How often do you find yourself submitting a commit and then wanting to revert it the next second? This may seem like a real inconvenience, but thereโ€™s actual...
Published ย  September 29, 2022