1

I was working in a project but I'm done now, I was handling git from vs code and now I want to remove the repository and don't know how to do it.

This is what I see in my vs code

enter image description here

I do not recognize any of those 10k changes, none of those files... I just want to make that number disappear. You see that "main" in the bottom left corner, that's the repository I want to remove.

I've read How to unlink / sign out from Git repository in "Visual Studio Code" for Mac and How to delete git repository(laravel project) on visual studio code

I've tried deleting the .git folder, signed out of my github account from visual studio, uncheck the git : Github Authentification in the settings, pasting the "git.enabled": false into the settings.json, deleting the Personal Access Token in github(I didn't have one either).

None of what I mencioned above worked and don't know what else to try. I just want to remove the repository, not change it just unlink it. My last resource would be reinstall visual studio in hopes I get it but there should be one way to achieve this without doing something crazy.

rottenCoderSo
  • 141
  • 2
  • 10
  • "*I've tried deleting the .git folder…*" Which one? – phd Dec 20 '21 at 17:30
  • the one that's created with `git init` and hides in my local project, – rottenCoderSo Dec 20 '21 at 17:32
  • Well, I'd say you should delete all `.git` folders in project's the folder tree, but it seems you already did that... I can't imagine how git finds your local project if it does not have any `.git` folder in it... – Leonardo Alves Machado Dec 20 '21 at 17:40
  • 1
    @rottenCoderSo It seems you still have a directory `.git/` in your `$HOME`. Remove this one. – phd Dec 20 '21 at 17:50
  • @phd I'm sorry but where do I find this `$HOME` ? you mean this one `C:\Users\campesino\.git` ? – rottenCoderSo Dec 20 '21 at 18:53
  • 1
    @rottenCoderSo `git rev-parse --show-toplevel` https://stackoverflow.com/a/43313909/7976758 , https://stackoverflow.com/a/15193576/7976758 , https://stackoverflow.com/search?q=%5Bgit%5D+undo+init+home – phd Dec 20 '21 at 19:20
  • @phd Today I came back to work on this issue and found out that its working good now. I guess me deleting the .git folder had something to do, if not then God knows what heppened here, now it shows the right number for every single repository once I open a different project. I still appreciate your time so thank you. – rottenCoderSo Dec 22 '21 at 17:28

0 Answers0