Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Ignore .vs

So, I tried making a new project and using BitBucket. I wanted to push my newly created project to the repository. However somehow my .vs and my packages folders got commited as well. I was too late with adding my .gitignore file and also It still commits the .vs file. Could anyone help me please? Thank you

vscode pic

How can I remove those files from my repository and prevent this from happening in the future?

like image 276
Joost00719 Avatar asked Dec 05 '25 07:12

Joost00719


1 Answers

Here's a proper answer.

  1. Add .vs to .gitignore this will prevent it getting re-added again.
  2. Remove .vs from the git index but leave it on your file system. git rm -r --cached .vs
  3. Commit your updated .gitignore. git commit .gitignore.
  4. Push your changes.
like image 134
Richard Vanbergen Avatar answered Dec 06 '25 23:12

Richard Vanbergen