Like a branch on the server?

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.

Or add it to git? What's wrong with git?