An open API service indexing awesome lists of open source software.

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

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.