Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Intellij IDEA how do I reload file content's from disk?

In vim I can type :e and reload a file's contents from disk overwriting any changes I've made. It's a nice way to reset in case I've gotten lost or just want to undo all my changes. This obviously doesn't take into account any kind of refactoring, I just want to nuke all changes to buffer. Not even closing and reopening a tab will work.

How do I do this with Intellij IDEA? I'm using Intellij IDEA Ultimate 13 and I've disabled any kind of auto save.

like image 504
Bjorn Avatar asked Jan 09 '14 15:01

Bjorn


People also ask

What is reload from disk in IntelliJ?

Created August 30, 2021 02:20. It synchronizes the project files with what is stored on the hard drive.

What does reload all from disk do?

File>Reload can be used to reload the current buffer from disk at any other time; a confirmation dialog box will be displayed first if the buffer has unsaved changes. File>Reload All discards unsaved changes in all open buffers and reload them from disk, asking for confirmation first.

How do I restore changes in IntelliJ?

Restore changes in a file With IntelliJ IDEA you can restore that change in a couple of clicks. Right-click anywhere in the editor and choose Local History | Show History from the context menu. In the dialog that opens, the left-hand pane shows a list of all saved revisions of the current file with timestamps.


2 Answers

File > Synchronize (Ctrl+Alt+Y) It will load the file from the file system. If you have unsaved changes, it will ask if you want to discard them.

like image 56
Javaru Avatar answered Oct 27 '22 20:10

Javaru


⌥⌘Y - Synchronize for Mac users

enter image description here

like image 39
0x8BADF00D Avatar answered Oct 27 '22 21:10

0x8BADF00D