post commit hook added to readme
This commit is contained in:
@@ -17,6 +17,27 @@ Generate markdown documentation from directory structure. Optimized for LLM inge
|
||||
- Frontend only mode (include only frontend files and `README.md`)
|
||||
- Omit test files and inline test blocks (Go, Java, Rust)
|
||||
|
||||
## Use with Git Post Hook
|
||||
combine with git post hook to sync with proton drive on each commit
|
||||
|
||||
add something like this in ./.git/hooks/post-commit
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if ! command -v dirmd &>/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
REPO_NAME=$(basename "$REPO_ROOT")
|
||||
|
||||
dirmd -o "/tmp/${REPO_NAME}" "$REPO_ROOT" -f --vertical-slices --proton-drive
|
||||
```
|
||||
|
||||
|
||||
## Build
|
||||
|
||||
go build -o dirmd .
|
||||
|
||||
Reference in New Issue
Block a user