I’m writing to a JSON file constantly and overtime it fills up my storage in .git. I put .gitignore on the end of the json and am writing to the .gitignore only and not any other file. Why is my .git storage always full and I have to run rm -rf .git
?
Hi @efewqefwfd – can you share some more about how you’re using the .gitignore? The way I’ve gitignored files in the past, was that I had a file called .gitignore
and I listed inside of it which files should not be tracked (but there are probably other ways of doing it!) You could maybe try doing it that way, and see if it works the way you expect?
I did it this way.
Cool! I’ll test both ways and see what results I get!
I still need help with this.
We’re here for you @efewqefwfd!
Can you tell us the name of your project where this is happening?
trello-ranking-trainee
Thanks for that info @efewqefwfd!
I’ve given your project additional disk space for 24 hours. This should give you the room needed to add files that are taking up too much space to .gitignore
.
Project files that take up alot of space are usually ones that your project rewrites often. This includes any .sqlite
files.
Once you have added larger files to .gitignore
run the following commands in the project console:
git prune
and hit enter
git gc
and hit enter.
refresh
and hit enter
This should free up the space you need.
If you have any questions, let us know!
That’s not the problem. The problem is that I’ve already added them to .gitignore. I can use rm -rf .git to clear it when the storage is full, the problem is I’ve done what you already said to do and it still takes up storage in .git.
Thanks for the clarification! I’m wondering if this may be the issue:
-
Sometimes projects get stuck in npm even though they’re expected to be using pnpm.
-
In these cases, running the following in the project’s console can help:
echo '{}' > glitch.json
refresh
rm -rf node_modules /rbd/pnpm-volume/app/node_modules
pnpm install -vvv
rm glitch.json && refresh
Please give this a try and let us know if it helps!