英文:
All my computer files (downloads, Desktop, photos, etc) were imported to VS Code and if I delete something there, it deletes the files in my computer
问题
I have never used VS Code before. I have taken c++ intro to CS second semester and I recently obtained an internship where I have to develop an app using React Native. I have never used the terminal in my life expect step by step tutorials from my professor to install Clion (the IDE we have used in class). On the first day my professor just sent us some video tutorials on how to create an app with React (https://www.youtube.com/watch?v=0-S5a0eXPoc) but my Mac is really old so I've been having to download different versions of Xcode and Node.js. I followed the video to download VS Code. Anyway, I got to the point where he says to open the project in VS Code and when I did, it gave me an error message. To be honest, I did so much to try to fix the error that I don't remember everything I did on my terminal, but now all my computer files/apps are in one of the projects in VS Code. I have looked it up online and I keep seeing something about a file .git, but I don't have that file in the specific project that has all my files. To see if it deletes files from my computer, deleted a project I have in Clion (straight from VS Code) and it actually deleted my file from cLion. Someone, please help. How do I delete that entire project/folder, which by the way has my administrator name, without deleting my original files?
英文:
I have never used VS Code before. I have taken c++ intro to CS second semester and I recently obtained an internship where I have to develop an app using React Native. I have never used the terminal in my life expect step by step tutorials from my professor to install Clion (the IDE we have used in class).
On the first day my professor just sent us some video tutorials on how to create an app with React (https://www.youtube.com/watch?v=0-S5a0eXPoc) but my Mac is really old so I've been having to download different versions of Xcode and Node.js. I followed the video to download VS Code.
Anyway, I got to the point where he says to open the project in VS Code and when I did, it gave me an error message. To be honest, I did so much to try to fix the error that I don't remember everything I did on my terminal, but now all my computer files/apps are in one of the projects in VS Code.
I have looked it up online and I keep seeing something about a file .git, but I don't have that file in the specific project that has all my files. To see if it deletes files from my computer, deleted a project I have in Clion (straight from VS Code) and it actually deleted my file from cLion. Someone, please help. How do I delete that entire project/ folder, which by the way has my administrator name, without deleting my original files?
答案1
得分: 2
与大多数源代码/文本编辑器一样,VS Code具有内置的文件资源管理器。它就像您的操作系统文件管理器一样工作,因此,如果您在VS Code中删除了某些内容,这等同于通过系统删除它。
为了安全和最重要的是,组织您正在编辑的文件,每当您在Visual Studio Code中处理项目时,请执行以下操作:
文件 -> 打开文件夹 -> (选择您的项目文件夹) -> 打开
这样,Visual Studio Code将仅在文件资源管理器中显示所选文件夹中的文件,就像下面的示例一样:
如果您想要更好地控制,以免删除不应删除的内容,您可以使用版本控制系统,就像您在评论中提到的Git。Git并不像看起来那么复杂,但我认为除了它的重要性之外,最好先了解一些有关开发环境的知识。
英文:
Like most source code/text editors, VS Code has a built-in file explorer. It works as your operating system's file manager, so if you delete something in VS Code, it's the same thing as deleting it through your system.
To be safe and, above all, organize the files you are editing, whenever you work on a project in Visual Studio Code, do the following:
File -> Open Folder -> (Select your project folder) -> Open
So Visual Studio Code will only show the files in the selected folder in your file explorer, as in the example below:
If you want to have greater control to lose that fear of deleting something you shouldn't, you can use a version control system, like the Git you mentioned in the comments. Git is not as complex as it seems, but I believe that in addition to its great importance, it might be better to know some things about the development environment first.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论