@gw-tools/gw 0.12.10 → 0.12.11
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 +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -202,6 +202,9 @@ gw add <worktree-name> [files...]
|
|
|
202
202
|
|
|
203
203
|
This command wraps `git worktree add` and optionally copies files to the new worktree. If `autoCopyFiles` is configured, those files are automatically copied. You can override this by specifying files as arguments.
|
|
204
204
|
|
|
205
|
+
**Branch Creation Behavior:**
|
|
206
|
+
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.
|
|
207
|
+
|
|
205
208
|
#### Arguments
|
|
206
209
|
|
|
207
210
|
- `<worktree-name>`: Name or path for the new worktree
|