{"version":"2.1.300","anchor":"worktree-pr-creation-supports-a-forge-and-uses-head-commit","canonical_anchor":"worktree-pr-creation-supports-a-forge-and-uses-head-commit","heading":"--worktree from a pull request now tracks its host and names the head commit","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300\/e\/worktree-pr-creation-supports-a-forge-and-uses-head-commit","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300","markdown":"### `--worktree` from a pull request now tracks its host and names the head commit\n\nWith `--worktree` and a pull request, Claude Code now passes on which host the request came from and shows the head commit in its message\n\n**What**\n\n`--worktree` starts Claude Code in a separate git worktree, a second working copy of your repository. You can branch it from a pull request or merge request. Claude Code now passes on both the request number and the forge, meaning the code-hosting service it came from, instead of the number alone.\n\nThe \"Created worktree:\" message now shows the head commit instead of the base branch in two cases:\n\n- a pull request or merge request was used\n\n- the base ends with `^{commit}`\n\n**Why**\n\nThe worktree setup now knows which hosting service a request belongs to, which points to requests from hosts other than GitHub being handled. The message also shows the exact commit you started from.\n\n- Area: Worktrees\n- Names: `--worktree`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}