.pre-commit directory is not cleaned up
See original GitHub issueI noticed at one point that my ~/.pre-commit directory was 3G in size, which seems pretty large.
I asked around and @struys said:
jtwang: we don’t do garbage collection so when you get a new version of hooks, the old one stays there jtwang: you can also use
pre-commit clean
to remove the files rm’ing the directory directly isn’t a great idea jtwang: mind filing a ticket on pre-commit - https://github.com/pre-commit/pre-commit we should add some form of GC based on the last time you used a hook repo
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
In Git pre-commit hook, temporarily remove all changes that ...
Git tracks only files, not directories. However, the command git clean can remove directories. As the result, the script will remove empty ...
Read more >pre-commit
new in 1.14.0: a commit is no longer necessary to try-repo on a local directory. pre-commit will clone any tracked uncommitted changes. ~/work/hook-repo...
Read more >FAQ • precommit - Lorenz Walthert's
If that does not work, run $ pre-commit clean to clean the pre-commit cache. Then, try again. Although you could also clear the...
Read more >Extend your pre-commit hooks with AWS CloudFormation Guard
We will also provide patterns you can use to centrally maintain a list of rules that security teams can use to roll out...
Read more >Keep your code clean using Black & Pylint & Git Hooks & Pre ...
Sign up for Medium and get an extra one ... Create the file pre-commit in the folder .git/hooks/. You should not include any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This has been released as part of v1.14.0 🎉 – thanks again!
#906 implements a thing which:
.pre-commit-config.yaml
files in the pre-commit dbpre-commit gc
command which cleans all repos which aren’t referenced