如果你不小心添加了一些应该被忽略的文件,你如何将它们从版本控制中去除而不会丢失它们?或许你有自己的IDE配置文件,不是项目的一部分,但将会花费很多时间使之按照自己的方式工作。
如果你还没有提交,你只需要
→ 来取消添加,你需要将这个文件添加到忽略列表,这样它们才不会被再次误添加近来。如果文件已经存在于版本库,你需要做更多的工作。
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.