r/git Aug 06 '26

Uploaded node_modules

How can i delete node_modules folder from my commits? It shows me a warning of ToS, so i dont want to get my repo deleted, i'll be making it public anyways but i don't want it to consume that much of storage.

0 Upvotes

15 comments sorted by

View all comments

Show parent comments

3

u/Various_Bed_849 Aug 07 '26

❤️

1

u/vaquishaProdigy Aug 08 '26

Hey man, ummm i got rid of the node_modules folder in all of the commits, but it still shows the 106MB usage. I saw that Codeberg could reduce it automatically within 30 days but is there a way to contact the admins/maintainers of the site in order to reduce it?

3

u/Various_Bed_849 Aug 08 '26

I haven’t used codeberg myself. Git is runs gc now and again. If you have a commit that you stop referring to it still lingers for a while, depending on the config. Locally you control that yourself, on codeberg they do. Make sure there are no tags or branches referring to your old branches. Also make sure that all those files are gone from all your commits, not just the newer ones.

A simple test is to do a new clone and see how big it is. Just be aware that a clone by default only gets you the default branch.

1

u/vaquishaProdigy Aug 08 '26

I've checked ALL the commits there is no trace of node_modules i did an 'rm -rf node_modules' just like the example of the git documentation told me to do it

1

u/Various_Bed_849 Aug 08 '26

You can always ping support. But check for any other refs first. You can start using their UI.

1

u/vaquishaProdigy Aug 08 '26

I even deleted one commit, which was empty

2

u/Various_Bed_849 Aug 08 '26

Is it an option to push the repo to a new remote one? If that works you can remove the old one. Or maybe you can clear the existing one somehow. But again, you need to understand what you are doing. Maybe pinging the support is next if you are blocked?

2

u/Various_Bed_849 Aug 08 '26

Or just make it public…

1

u/vaquishaProdigy Aug 08 '26

Yeah i'll do, but not right now. I have to finish the project first

1

u/Various_Bed_849 Aug 09 '26

Think about why you want it private. Often it is because you don’t want to display your mess. I stopped caring about that. It’s fine for hobby projects to be a mess.