Skip to content

Commit 819c3e7

Browse files
committed
v0.2.1: docs: update README and TODO for git subtree workflow
Replace submodule instructions with git subtree approach: - subtree add with --prefix=scripts - named remote for convenience (git remote add repokit-common) - pull/push commands for bidirectional sync - note about existing scripts/ files needing temporary move This reflects the proven setup tested with DazzleLink.
1 parent 5a0e3fb commit 819c3e7

2 files changed

Lines changed: 38 additions & 9 deletions

File tree

‎README.md‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
# git-repokit-common
22

3-
Shared scripts, hooks, and developer tools for DazzleTools projects. Consumed as a git submodule in `scripts/`.
3+
Shared scripts, hooks, and developer tools for DazzleTools projects. Consumed as a git subtree in `scripts/`.
44

55
## Quick Start
66

77
Add to your project:
88

99
```bash
10-
git submodule add https://github.com/DazzleTools/git-repokit-common.git scripts/repokit-common
11-
bash scripts/repokit-common/install-hooks.sh
10+
# Add as a subtree at scripts/
11+
git subtree add --prefix=scripts https://github.com/DazzleTools/git-repokit-common.git main --squash
12+
13+
# Add named remote for convenience
14+
git remote add repokit-common https://github.com/DazzleTools/git-repokit-common.git
15+
16+
# Install git hooks
17+
bash scripts/install-hooks.sh
1218
```
1319

1420
Update to latest:
1521

1622
```bash
17-
cd scripts/repokit-common && git pull origin main
23+
git subtree pull --prefix=scripts repokit-common main --squash
24+
```
25+
26+
Push local improvements back upstream:
27+
28+
```bash
29+
git subtree push --prefix=scripts repokit-common main
1830
```
1931

2032
## What's Included

‎TODO.md‎

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
# Post-Setup TODO
22

3-
After adding `git-repokit-common` as a submodule or worktree, complete these steps:
3+
## Adding to Your Project (git subtree)
44

5-
## Required
5+
```bash
6+
# 1. Add repokit-common as a subtree in your scripts/ directory
7+
git subtree add --prefix=scripts https://github.com/DazzleTools/git-repokit-common.git main --squash
8+
9+
# 2. Add a named remote so you don't type the URL each time
10+
git remote add repokit-common https://github.com/DazzleTools/git-repokit-common.git
11+
12+
# 3. Future updates
13+
git subtree pull --prefix=scripts repokit-common main --squash
14+
15+
# 4. Push local improvements back upstream
16+
git subtree push --prefix=scripts repokit-common main
17+
```
18+
19+
Note: If you already have files in `scripts/`, move them out first, do the subtree add, then move them back. Git subtree requires an empty prefix directory on first add.
20+
21+
## Required (after subtree add)
622

723
- [ ] **Configure pyproject.toml**: Add `[tool.repokit-common]` section (hooks depend on this):
824
```toml
@@ -14,11 +30,11 @@ After adding `git-repokit-common` as a submodule or worktree, complete these ste
1430
private-patterns = ["private/", "local/", ".env"]
1531
```
1632
- [ ] **Create `_version.py`**: Copy the version module template into your package directory and edit the initial version values
17-
- [ ] **Install hooks**: Run `bash scripts/repokit-common/install-hooks.sh`
33+
- [ ] **Install hooks**: Run `bash scripts/install-hooks.sh`
1834

1935
## Customize (as needed)
2036

21-
- [ ] **VHS demo tapes** (`vhs/*.tape`): Replace `repokit-common` with your actual CLI command name
37+
- [ ] **VHS demo tapes** (`scripts/vhs/*.tape`): Replace placeholder CLI commands with your actual command name
2238
- [ ] **demo_render.py**: Rewrite with your project's output format (the existing content is a template/example)
2339
- [ ] **Pre-push hook**: Verify the auto-detected package directory is correct for your project
2440

@@ -32,4 +48,5 @@ After adding `git-repokit-common` as a submodule or worktree, complete these ste
3248

3349
- The hooks auto-detect your Python package directory (looks for `__init__.py` at the project root)
3450
- `sync-versions.py` reads config from `pyproject.toml [tool.repokit-common]` automatically
35-
- Update this submodule anytime: `cd scripts/repokit-common && git pull origin main`
51+
- `--prefix=scripts` must be used consistently for all subtree operations
52+
- Your project-specific scripts can coexist alongside repokit-common files in `scripts/`

0 commit comments

Comments
 (0)