@gw-tools/gw 0.12.14 → 0.12.15
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.md +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -213,6 +213,12 @@ This command wraps `git worktree add` and optionally copies files to the new wor
|
|
|
213
213
|
**Branch Creation Behavior:**
|
|
214
214
|
When creating a new worktree without specifying an existing branch, `gw add` automatically fetches the latest version of your default branch (e.g., `main`) from the remote (e.g., `origin/main`) to ensure your new branch is based on the most recent code. If the remote is unavailable (no network or no remote configured), it gracefully falls back to using the local branch with a warning message.
|
|
215
215
|
|
|
216
|
+
**Upstream Tracking:**
|
|
217
|
+
When `gw add` creates a new branch, it automatically configures the branch to track `origin/<branch-name>` (e.g., `origin/feat/my-feature`). This means `git push` will push to the correct remote branch without needing to specify `-u origin <branch>` on first push.
|
|
218
|
+
|
|
219
|
+
**Git Ref Conflict Detection:**
|
|
220
|
+
The command automatically detects and prevents Git ref naming conflicts. For example, you cannot have both a branch named `test` and `test/foo` because Git stores branches as files in `.git/refs/heads/`, and `test` cannot be both a file and a directory. If a conflict is detected, you'll receive a helpful error message with suggestions for resolving it.
|
|
221
|
+
|
|
216
222
|
#### Arguments
|
|
217
223
|
|
|
218
224
|
- `<worktree-name>`: Name or path for the new worktree
|