Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github desktop caches deleted local repository

Tags:

github

I'm new at GitHub and I'm having this issue: I created three private repositories for my project, all fine. On the fourth one, for some reason GitHub desktop included the node_modules folder (its an angular cli app), so I deleted the repository from GitHub.com and from GitHub desktop. When I try to recreate it, it is "cached" on my Mac, even if I copy everything to another folder, and it tries to upload the node_module files.

I also changed the name of the repository, copied all the files but node_modules folder to another folder. Same happens over and over.

I couldn't find anything on internet about this. Sorry if its a newbie question.

like image 488
Danielle Avatar asked Feb 22 '26 03:02

Danielle


1 Answers

  1. You could try to delete the git folder that it's being hidden by default. Go to in file explore -Views- select "Hidden Items" and try to remove the git folder from here. After that set up your .gitignore file and pass node_modules before you use git init enter image description here
  2. Use this in your terminal, if you are using VS Code use this in the same folder you are having the problem : git config --global core.excludesfile '~/.gitignore'
like image 178
Flash Avatar answered Feb 25 '26 02:02

Flash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!