githubvisual-studio-code

How do I use .gitignore in visual studio code?


So I know this might sound like a noob question but I'm rather inexperienced with GitHub. I want to add a gitignore file to my repository, but I am unable to do so and I don't know how. I want to make sure a file is gitignored My visual studio code is connected with my repository. So I am able to push and pull via visual code.

Greetings,

Parsa & Liyam


Solution

  • You may go to File > New File at the root of your git repository (same directory as where your .git hidden folder is in). Then add all the directories/file that you want to be ignored into that new file and save it as .gitignore. (You can save as a plaintext file and just name it .gitignore within VS Code.