In PHPStorm's Git interface it's easy to stage files and folders, with the "+Add" option in the "Git >" submenu of the right click context menu. But, how do I remove them from stage?
I've found an easy (but not obvious) way to remove files from Git in PHPStorm (or any other IntelliJ based IDE) when they still haven't been committed (for example, you "add"/stage some files which will finally not be used).
You just have to right click the file and select "Git > Revert". Since it's still not commited, "reverting" will actually "remove"/unstage the file from Git.
You even have the option to physically remove the file by checking the "Delete local copies of added files" option, or just leave it as it is after removing it from Git by leaving that option unchecked (in that case the file will be shown in red as if it still hadn't been added).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With