So ive made a discord bot, and in it, i have the token separate from the main file so i can hide it from github. I use vs code to make changes, but when i commit and push them, it pushes the file i want hidden too. Is there a way I can tell vs code to not push the hidden file so i can keep it secret?
I have const token = require('./config.json');
to import the token, and i could keep it in a different folder than vs code opens, but I would like to avoid that. I have tried adding it to the .gitignore and deleting it from the repo, but when i pull in vs code it deletes the local file. I don't think i fully understand the gitignore file though.