If you accidentally added some files which should have been ignored, how do you get them out of version control without losing them? Maybe you have your own IDE configuration file which is not part of the project, but which took you a long time to set up just the way you like it.
If you have not yet committed the add, then all you have to do is use
→ to undo the add. You should then add the file(s) to the ignore list so they don't get added again later by mistake.If the files are already in the repository, you have to do a little more work.
Hold the Shift key to get the extended context menu and use → to mark the file/folder for deletion from the repository without losing the local copy.
→ the parent folder.
Add the file/folder to the ignore list so you don't get into the same trouble again.