How do I remove a folder from version control (but not delete it) using Intellij IDEA?
As this is a unusual use case, there is no direct way to do this. This is assuming the directory in question has indeed been committed and not just added. An added but not yet committed directory can be reverted/rollbacked.
A way you can do this within IDEA is as follows:
- Delete the directory
- Commit to VC
- In the Project view (or the Navigation Bar), open the context menu on the parent directory of the directory you just deleted and select Local History > Show History
- In the local history dialog, select the "Deleting" action (should be the top one) and click the Revert button.
- If you get an "Add files to {VCS Name}" dialog, just hit cancel
- Close the local history dialog.
Your directory has now been removed from VC but is back on your file system.
Edit:
If this is a common occurrence for you, you can record this in a macro (Edit > Macros). Use the left arrow ← to move to the parent directory for step 3. You can then map the macro to a shortcut in Settings > Keymap
If you only added the directory to SVN(without commit), just Revert it and it will be unversioned.
If you already committed the directory into SVN, in Intellij:
VCS > Browse VCS Repository > Browse Subversion Repository....
It will open the repo browser, then:
right click on folder you want to delete > Delete... > Commit