@akiojin/gwt 6.24.0 → 6.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +52 -0
- package/README.md +52 -0
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -239,6 +239,58 @@ gwt は PATH 上のエージェントを検出し、ランチャーに表示し
|
|
|
239
239
|
- `models` は任意です。定義するとモデル選択ステップが表示されます。
|
|
240
240
|
- `versionCommand` は任意です。定義するとバージョン検出に使用されます。
|
|
241
241
|
|
|
242
|
+
## Bareリポジトリワークフロー
|
|
243
|
+
|
|
244
|
+
gwtは効率的なワークツリー管理のためにbareリポジトリワークフローをサポートしています。このアプローチではbareリポジトリ(`.git`データ)をワークツリーから分離し、より整理されたプロジェクト構成を提供します。
|
|
245
|
+
|
|
246
|
+
### ディレクトリ構造
|
|
247
|
+
|
|
248
|
+
```text
|
|
249
|
+
/project/
|
|
250
|
+
├── repo.git/ # Bareリポジトリ
|
|
251
|
+
├── main/ # ワークツリー(mainブランチ)
|
|
252
|
+
├── feature-x/ # ワークツリー(feature/xブランチ)
|
|
253
|
+
└── .gwt/ # gwt設定
|
|
254
|
+
└── project.json
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Bareリポジトリのセットアップ
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# bareリポジトリとしてクローン
|
|
261
|
+
git clone --bare https://github.com/user/repo.git repo.git
|
|
262
|
+
|
|
263
|
+
# bareリポジトリからワークツリーを作成
|
|
264
|
+
cd repo.git
|
|
265
|
+
git worktree add ../main main
|
|
266
|
+
git worktree add ../feature-x feature/x
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Bareリポジトリでのgwt使用
|
|
270
|
+
|
|
271
|
+
bareリポジトリまたはそのワークツリー内でgwtを実行した場合:
|
|
272
|
+
|
|
273
|
+
| 起動場所 | ヘッダー表示 |
|
|
274
|
+
|----------|-------------|
|
|
275
|
+
| 通常リポジトリ | `Working Directory: /path [branch]` |
|
|
276
|
+
| Bareリポジトリ | `Working Directory: /path/repo.git [bare]` |
|
|
277
|
+
| ワークツリー(通常) | `Working Directory: /path [branch]` |
|
|
278
|
+
| ワークツリー(bare方式) | `Working Directory: /path [branch] (repo.git)` |
|
|
279
|
+
|
|
280
|
+
### `.worktrees/`方式からのマイグレーション
|
|
281
|
+
|
|
282
|
+
既存の`.worktrees/`ディレクトリ方式を使用しているリポジトリがある場合、gwtはこれを検出してbareリポジトリ方式へのマイグレーションを提案します:
|
|
283
|
+
|
|
284
|
+
1. **バックアップ**: `.gwt-migration-backup/`にバックアップを作成
|
|
285
|
+
2. **bareリポジトリ作成**: `{repo-name}.git`を作成
|
|
286
|
+
3. **ワークツリー移行**: 既存ワークツリーを新構造に移動
|
|
287
|
+
4. **クリーンアップ**: 古い`.worktrees/`ディレクトリを削除
|
|
288
|
+
5. **設定作成**: `.gwt/project.json`を作成
|
|
289
|
+
|
|
290
|
+
### サブモジュールサポート
|
|
291
|
+
|
|
292
|
+
ワークツリー作成時、gwtはサブモジュールが存在する場合は自動的に初期化します。これにより、ワークツリー作成直後からサブモジュールを使用できます。
|
|
293
|
+
|
|
242
294
|
## 高度なワークフロー
|
|
243
295
|
|
|
244
296
|
### ブランチ戦略
|
package/README.md
CHANGED
|
@@ -239,6 +239,58 @@ Notes:
|
|
|
239
239
|
- `models` is optional. If defined, model selection step will be shown for this agent.
|
|
240
240
|
- `versionCommand` is optional. If defined, version detection will use this command instead of skipping version selection.
|
|
241
241
|
|
|
242
|
+
## Bare Repository Workflow
|
|
243
|
+
|
|
244
|
+
gwt supports a bare repository workflow for efficient worktree management. This approach keeps the bare repository (`.git` data) separate from worktrees, providing cleaner project organization.
|
|
245
|
+
|
|
246
|
+
### Directory Structure
|
|
247
|
+
|
|
248
|
+
```text
|
|
249
|
+
/project/
|
|
250
|
+
├── repo.git/ # Bare repository
|
|
251
|
+
├── main/ # Worktree (main branch)
|
|
252
|
+
├── feature-x/ # Worktree (feature/x branch)
|
|
253
|
+
└── .gwt/ # gwt configuration
|
|
254
|
+
└── project.json
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Setting Up a Bare Repository
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Clone as bare repository
|
|
261
|
+
git clone --bare https://github.com/user/repo.git repo.git
|
|
262
|
+
|
|
263
|
+
# Create worktrees from bare repository
|
|
264
|
+
cd repo.git
|
|
265
|
+
git worktree add ../main main
|
|
266
|
+
git worktree add ../feature-x feature/x
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Using gwt with Bare Repositories
|
|
270
|
+
|
|
271
|
+
When you run gwt in a bare repository or its worktrees:
|
|
272
|
+
|
|
273
|
+
| Location | Header Display |
|
|
274
|
+
|----------|----------------|
|
|
275
|
+
| Normal repository | `Working Directory: /path [branch]` |
|
|
276
|
+
| Bare repository | `Working Directory: /path/repo.git [bare]` |
|
|
277
|
+
| Worktree (normal) | `Working Directory: /path [branch]` |
|
|
278
|
+
| Worktree (bare-based) | `Working Directory: /path [branch] (repo.git)` |
|
|
279
|
+
|
|
280
|
+
### Migration from `.worktrees/` Method
|
|
281
|
+
|
|
282
|
+
If you have an existing repository using the `.worktrees/` directory method, gwt will detect this and offer migration to the bare repository method:
|
|
283
|
+
|
|
284
|
+
1. **Backup**: Creates backup in `.gwt-migration-backup/`
|
|
285
|
+
2. **Create bare repo**: Creates `{repo-name}.git`
|
|
286
|
+
3. **Migrate worktrees**: Moves existing worktrees to new structure
|
|
287
|
+
4. **Cleanup**: Removes old `.worktrees/` directory
|
|
288
|
+
5. **Configure**: Creates `.gwt/project.json`
|
|
289
|
+
|
|
290
|
+
### Submodule Support
|
|
291
|
+
|
|
292
|
+
When creating worktrees, gwt automatically initializes submodules if present. This ensures submodules are ready to use immediately after worktree creation.
|
|
293
|
+
|
|
242
294
|
## Advanced Workflows
|
|
243
295
|
|
|
244
296
|
### Branch Strategy
|