https://github.com/aleksac/gitdispose
Remove useless .gitkeep files from your repo
https://github.com/aleksac/gitdispose
pre-commit pre-commit-hook python
Last synced: 8 months ago
JSON representation
Remove useless .gitkeep files from your repo
- Host: GitHub
- URL: https://github.com/aleksac/gitdispose
- Owner: AleksaC
- License: mit
- Created: 2025-06-21T16:57:19.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-21T17:00:53.000Z (12 months ago)
- Last Synced: 2025-09-07T20:53:09.214Z (9 months ago)
- Topics: pre-commit, pre-commit-hook, python
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitdispose
Remove useless `.gitkeep` files from your repo.
## About
Git doesn't track empty directories. To include such directories you need to put
a placeholder file inside them. A common (but unofficial) convention is to name
these files `.gitkeep`.
This is used when scaffolding a project, and in project templates. Files are usually
added later to those directories. However, the initial `.gitkeep` files are often
left behind, no longer serving any purpose. This utility finds such files and removes them.
## Getting started
### pre-commit
The recommended way to use this utility is with [pre-commit](https://github.com/pre-commit/pre-commit).
Here's an example configuration:
```yaml
repos:
- repo: https://github.com/AleksaC/gitdispose
rev: v0.1.0
hooks:
- id: gitdispose
```
Run `pre-commit autoupdate` to get the latest version.