How to disable .git?

I need to rm -rf .git every three days or the disk will be full… I don’t really need .git so how do i disable it?

Hey @Min there’s no way to disable git in Glitch projects, although one might be able to write a git hook to abort the commit - I’ve taken a brief look at doing that but haven’t gotten it working yet.

In your case you’ve probably got a file or files that are being updated regularly by some backend process. The Glitch way to stop this problem is to add whatever files are often updated to a gitignore file, which will stop git from committing those files every 10 minutes and should stop the growth of your git directory. If you need additional help with this let us know along with your project name and we’ll see what we can do.

1 Like

Hey @Min I now have a working example of using a git hook to prevent automatic commits. Check it out at https://glitch.com/~stop-default-commits.

1 Like

Thanks a lot! I will be trying this.

1 Like