Skip to content

Commit 500d199

Browse files
authored
Merge pull request #79 from githubnext/copilot/fix-evergreen-merge-issue
Fix evergreen agent "Branch does not exist locally" push failure
2 parents 0be89ed + 4749fd5 commit 500d199

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/evergreen.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,11 @@ A pre-flight step has already identified a PR that needs attention. Read the sel
279279
- `selected.base_branch` — the target branch (usually `main`)
280280
- `selected.attempts` — how many times we've already tried on this SHA
281281

282-
2. **Check out the PR branch** and investigate the issues.
282+
2. **Check out the PR branch** as a local tracking branch so the push tool can find it:
283+
```bash
284+
git checkout -b <head_branch> origin/<head_branch>
285+
```
286+
where `<head_branch>` is `selected.head_branch` from the selection file. **Do not** use a detached HEAD checkout — the `push-to-pull-request-branch` tool requires a named local branch.
283287

284288
3. **Fix the issues**:
285289

0 commit comments

Comments
 (0)