That would still be in git. The local history in IntelliJ works independently of any VCS.
Also I’ve had formatters botch files including changes I hadn’t committed yet. For that the local edit history is also useful.